Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
244 changes: 53 additions & 191 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ parameters:
-
message: '#^Cannot call method remove\(\) on PhpMyAdmin\\SqlParser\\Components\\OptionsArray\|null\.$#'
identifier: method.nonObject
count: 3
count: 1
path: src/Components/AlterOperation.php

-
Expand Down Expand Up @@ -156,36 +156,6 @@ parameters:
count: 1
path: src/Context.php

-
message: '#^Binary operation "\." between mixed and mixed results in an error\.$#'
identifier: binaryOp.invalid
count: 2
path: src/Lexer.php

-
message: '#^Binary operation "\." between string and mixed results in an error\.$#'
identifier: binaryOp.invalid
count: 2
path: src/Lexer.php

-
message: '#^Binary operation "\.\=" between mixed and mixed results in an error\.$#'
identifier: assignOp.invalid
count: 9
path: src/Lexer.php

-
message: '#^Binary operation "\.\=" between mixed and string results in an error\.$#'
identifier: assignOp.invalid
count: 2
path: src/Lexer.php

-
message: '#^Binary operation "\.\=" between string and mixed results in an error\.$#'
identifier: assignOp.invalid
count: 11
path: src/Lexer.php

-
message: '#^Cannot access property \$type on PhpMyAdmin\\SqlParser\\Token\|null\.$#'
identifier: property.nonObject
Expand Down Expand Up @@ -240,54 +210,6 @@ parameters:
count: 1
path: src/Lexer.php

-
message: '#^Parameter \#1 \$character of static method PhpMyAdmin\\SqlParser\\Context\:\:isString\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Lexer.php

-
message: '#^Parameter \#1 \$character of static method PhpMyAdmin\\SqlParser\\Context\:\:isSymbol\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Lexer.php

-
message: '#^Parameter \#1 \$character of static method PhpMyAdmin\\SqlParser\\Context\:\:isWhitespace\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 5
path: src/Lexer.php

-
message: '#^Parameter \#1 \$string of static method PhpMyAdmin\\SqlParser\\Context\:\:isComment\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 2
path: src/Lexer.php

-
message: '#^Parameter \#1 \$string of static method PhpMyAdmin\\SqlParser\\Context\:\:isSeparator\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 4
path: src/Lexer.php

-
message: '#^Parameter \#1 \$token of class PhpMyAdmin\\SqlParser\\Token constructor expects string, mixed given\.$#'
identifier: argument.type
count: 7
path: src/Lexer.php

-
message: '#^Parameter \#2 \$str of method PhpMyAdmin\\SqlParser\\Lexer\:\:error\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 2
path: src/Lexer.php

-
message: '#^Parameter \#2 \.\.\.\$values of function sprintf expects bool\|float\|int\|string\|null, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Lexer.php

-
message: '#^Property PhpMyAdmin\\SqlParser\\Token\:\:\$keyword \(string\|null\) does not accept bool\|float\|int\|string\.$#'
identifier: assign.propertyType
Expand Down Expand Up @@ -876,6 +798,12 @@ parameters:
count: 1
path: src/Parsers/OptionsArrays.php

-
message: '#^Offset ''value'' might not exist on array\{expr\: string\}\|array\{name\: string, equals\: bool, expr\: string, value\: string\|null\}\.$#'
identifier: offsetAccess.notFound
count: 1
path: src/Parsers/OptionsArrays.php

-
message: '#^Only booleans are allowed in &&, mixed given on the right side\.$#'
identifier: booleanAnd.rightNotBoolean
Expand All @@ -889,21 +817,39 @@ parameters:
path: src/Parsers/OptionsArrays.php

-
message: '#^Property PhpMyAdmin\\SqlParser\\Components\\OptionsArray\:\:\$options \(array\<int, array\{name\: string, equals\: bool, expr\: PhpMyAdmin\\SqlParser\\Components\\Expression\|string, value\: string\|null\}\|string\>\) does not accept non\-empty\-array\<array\{name\: bool\|float\|int\|string, equals\: bool, expr\: PhpMyAdmin\\SqlParser\\Components\\Expression\|string, value\: string\|null\}\|string\>\.$#'
message: '#^Possibly invalid array key type mixed\.$#'
identifier: offsetAccess.invalidOffset
count: 14
path: src/Parsers/OptionsArrays.php

-
message: '#^Property PhpMyAdmin\\SqlParser\\Components\\OptionsArray\:\:\$options \(array\<int, array\{name\: string, equals\: bool, expr\: PhpMyAdmin\\SqlParser\\Components\\Expression\|string, value\: string\|null\}\|string\>\) does not accept non\-empty\-array\<array\{expr\: '''', value\: string\|null\}\|array\{name\: string, equals\: bool, expr\: PhpMyAdmin\\SqlParser\\Components\\Expression\|string, value\: string\|null\}\|string\>\.$#'
identifier: assign.propertyType
count: 2
count: 1
path: src/Parsers/OptionsArrays.php

-
message: '#^Property PhpMyAdmin\\SqlParser\\Components\\OptionsArray\:\:\$options \(array\<int, array\{name\: string, equals\: bool, expr\: PhpMyAdmin\\SqlParser\\Components\\Expression\|string, value\: string\|null\}\|string\>\) does not accept non\-empty\-array\<array\{name\: string, equals\: bool, expr\: PhpMyAdmin\\SqlParser\\Components\\Expression\|string, value\: string\|null\}\|bool\|float\|int\|string\>\.$#'
message: '#^Property PhpMyAdmin\\SqlParser\\Components\\OptionsArray\:\:\$options \(array\<int, array\{name\: string, equals\: bool, expr\: PhpMyAdmin\\SqlParser\\Components\\Expression\|string, value\: string\|null\}\|string\>\) does not accept non\-empty\-array\<array\{expr\: PhpMyAdmin\\SqlParser\\Components\\Expression, value\: string\|null\}\|array\{name\: string, equals\: bool, expr\: PhpMyAdmin\\SqlParser\\Components\\Expression\|string, value\: string\|null\}\|string\>\.$#'
identifier: assign.propertyType
count: 1
path: src/Parsers/OptionsArrays.php

-
message: '#^Property PhpMyAdmin\\SqlParser\\Components\\OptionsArray\:\:\$options \(array\<int, array\{name\: string, equals\: bool, expr\: PhpMyAdmin\\SqlParser\\Components\\Expression\|string, value\: string\|null\}\|string\>\) does not accept non\-empty\-array\<array\{name\: string, equals\: bool, expr\: PhpMyAdmin\\SqlParser\\Components\\Expression\|string, value\: string\|null\}\|string\>\.$#'
message: '#^Property PhpMyAdmin\\SqlParser\\Components\\OptionsArray\:\:\$options \(array\<int, array\{name\: string, equals\: bool, expr\: PhpMyAdmin\\SqlParser\\Components\\Expression\|string, value\: string\|null\}\|string\>\) does not accept non\-empty\-array\<array\{expr\: string, value\: string\}\|array\{name\: string, equals\: bool, expr\: PhpMyAdmin\\SqlParser\\Components\\Expression\|string, value\: string\|null\}\|string\>\.$#'
identifier: assign.propertyType
count: 3
count: 1
path: src/Parsers/OptionsArrays.php

-
message: '#^Property PhpMyAdmin\\SqlParser\\Components\\OptionsArray\:\:\$options \(array\<int, array\{name\: string, equals\: bool, expr\: PhpMyAdmin\\SqlParser\\Components\\Expression\|string, value\: string\|null\}\|string\>\) does not accept non\-empty\-array\<array\{name\: bool\|float\|int\|string, equals\: bool, expr\: PhpMyAdmin\\SqlParser\\Components\\Expression\|string, value\: string\|null\}\|string\>\.$#'
identifier: assign.propertyType
count: 2
path: src/Parsers/OptionsArrays.php

-
message: '#^Property PhpMyAdmin\\SqlParser\\Components\\OptionsArray\:\:\$options \(array\<int, array\{name\: string, equals\: bool, expr\: PhpMyAdmin\\SqlParser\\Components\\Expression\|string, value\: string\|null\}\|string\>\) does not accept non\-empty\-array\<array\{name\: string, equals\: bool, expr\: PhpMyAdmin\\SqlParser\\Components\\Expression\|string, value\: string\|null\}\|bool\|float\|int\|string\>\.$#'
identifier: assign.propertyType
count: 1
path: src/Parsers/OptionsArrays.php

-
Expand Down Expand Up @@ -1129,15 +1075,9 @@ parameters:
path: src/Statement.php

-
message: '#^Only booleans are allowed in an if condition, int\<0, 1\> given\.$#'
identifier: if.condNotBoolean
count: 1
path: src/Statement.php

-
message: '#^Only booleans are allowed in an if condition, int\<0, 2\> given\.$#'
message: '#^Only booleans are allowed in an if condition, int given\.$#'
identifier: if.condNotBoolean
count: 1
count: 2
path: src/Statement.php

-
Expand All @@ -1152,12 +1092,6 @@ parameters:
count: 1
path: src/Statement.php

-
message: '#^Variable property access on \$this\(PhpMyAdmin\\SqlParser\\Statement\)\.$#'
identifier: property.dynamicName
count: 5
path: src/Statement.php

-
message: '#^Argument of an invalid type array\<PhpMyAdmin\\SqlParser\\Components\\AlterOperation\>\|null supplied for foreach, only iterables are supported\.$#'
identifier: foreach.nonIterable
Expand Down Expand Up @@ -1290,12 +1224,6 @@ parameters:
count: 1
path: src/Statements/CreateStatement.php

-
message: '#^Variable property access on \$this\(PhpMyAdmin\\SqlParser\\Statements\\CreateStatement\)\.$#'
identifier: property.dynamicName
count: 3
path: src/Statements/CreateStatement.php

-
message: '#^Argument of an invalid type array\<PhpMyAdmin\\SqlParser\\Components\\Expression\>\|null supplied for foreach, only iterables are supported\.$#'
identifier: foreach.nonIterable
Expand Down Expand Up @@ -1590,12 +1518,6 @@ parameters:
count: 1
path: src/Statements/SelectStatement.php

-
message: '#^Variable property access on \$this\(PhpMyAdmin\\SqlParser\\Statements\\SelectStatement\)\.$#'
identifier: property.dynamicName
count: 1
path: src/Statements/SelectStatement.php

-
message: '#^Cannot call method build\(\) on PhpMyAdmin\\SqlParser\\Components\\OptionsArray\|null\.$#'
identifier: method.nonObject
Expand Down Expand Up @@ -1656,6 +1578,18 @@ parameters:
count: 1
path: src/Statements/WithStatement.php

-
message: '#^Possibly invalid array key type bool\|float\|int\|string\.$#'
identifier: offsetAccess.invalidOffset
count: 1
path: src/Statements/WithStatement.php

-
message: '#^Possibly invalid array key type bool\|float\|int\|string\|null\.$#'
identifier: offsetAccess.invalidOffset
count: 2
path: src/Statements/WithStatement.php

-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
identifier: empty.notAllowed
Expand Down Expand Up @@ -1813,15 +1747,15 @@ parameters:
path: src/Utils/CLI.php

-
message: '#^Parameter \#1 \$query of static method PhpMyAdmin\\SqlParser\\Utils\\Formatter\:\:format\(\) expects string, string\|false given\.$#'
message: '#^Parameter \#1 \$str of class PhpMyAdmin\\SqlParser\\Lexer constructor expects PhpMyAdmin\\SqlParser\\UtfString\|string, string\|false given\.$#'
identifier: argument.type
count: 1
count: 2
path: src/Utils/CLI.php

-
message: '#^Parameter \#1 \$str of class PhpMyAdmin\\SqlParser\\Lexer constructor expects PhpMyAdmin\\SqlParser\\UtfString\|string, string\|false given\.$#'
message: '#^Parameter \$type of class PhpMyAdmin\\SqlParser\\Utils\\FormattingOptions constructor expects ''cli''\|''html''\|''text'', string\|false given\.$#'
identifier: argument.type
count: 2
count: 1
path: src/Utils/CLI.php

-
Expand All @@ -1830,52 +1764,10 @@ parameters:
count: 1
path: src/Utils/Error.php

-
message: '#^Argument of an invalid type array\<int, array\<string, int\|string\>\>\|bool\|string supplied for foreach, only iterables are supported\.$#'
identifier: foreach.nonIterable
count: 1
path: src/Utils/Formatter.php

-
message: '#^Binary operation "&" between int and int\|string results in an error\.$#'
identifier: binaryOp.invalid
count: 1
path: src/Utils/Formatter.php

-
message: '#^Binary operation "&\=" between array\<int, array\<string, int\|string\>\>\|bool\|string\|null and array\<int, array\<string, int\|string\>\>\|bool\|string\|null results in an error\.$#'
identifier: assignOp.invalid
count: 1
path: src/Utils/Formatter.php

-
message: '#^Binary operation "\." between array\<int, array\<string, int\|string\>\>\|bool\|string and string results in an error\.$#'
identifier: binaryOp.invalid
count: 1
path: src/Utils/Formatter.php

-
message: '#^Binary operation "\.\=" between string and mixed results in an error\.$#'
identifier: assignOp.invalid
count: 1
path: src/Utils/Formatter.php

-
message: '#^Call to function in_array\(\) requires parameter \#3 to be set\.$#'
identifier: function.strict
count: 1
path: src/Utils/Formatter.php

-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
identifier: empty.notAllowed
count: 4
path: src/Utils/Formatter.php

-
message: '#^Method PhpMyAdmin\\SqlParser\\Utils\\Formatter\:\:getMergedOptions\(\) should return array\<string, array\<int, array\<string, int\|string\>\>\|bool\|string\> but returns array\<string, mixed\>\.$#'
identifier: return.type
count: 1
count: 3
path: src/Utils/Formatter.php

-
Expand All @@ -1884,30 +1776,12 @@ parameters:
count: 1
path: src/Utils/Formatter.php

-
message: '#^Only booleans are allowed in &&, array\<int, array\<string, int\|string\>\>\|bool\|string given on the left side\.$#'
identifier: booleanAnd.leftNotBoolean
count: 2
path: src/Utils/Formatter.php

-
message: '#^Only booleans are allowed in &&, array\<int, array\<string, int\|string\>\>\|bool\|string given on the right side\.$#'
identifier: booleanAnd.rightNotBoolean
count: 2
path: src/Utils/Formatter.php

-
message: '#^Only booleans are allowed in an if condition, bool\|int given\.$#'
identifier: if.condNotBoolean
count: 1
path: src/Utils/Formatter.php

-
message: '#^Only booleans are allowed in \|\|, array\<int, array\<string, int\|string\>\>\|bool\|string given on the right side\.$#'
identifier: booleanOr.rightNotBoolean
count: 1
path: src/Utils/Formatter.php

-
message: '#^Only booleans are allowed in \|\|, int\<0, 32\> given on the right side\.$#'
identifier: booleanOr.rightNotBoolean
Expand All @@ -1926,28 +1800,16 @@ parameters:
count: 2
path: src/Utils/Formatter.php

-
message: '#^Parameter \#1 \$string of function str_repeat expects string, array\<int, array\<string, int\|string\>\>\|bool\|string given\.$#'
identifier: argument.type
count: 1
path: src/Utils/Formatter.php

-
message: '#^Parameter \#1 \$string of method PhpMyAdmin\\SqlParser\\Utils\\Formatter\:\:escapeConsole\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 4
path: src/Utils/Formatter.php

-
message: '#^Parameter \#2 \$newFormats of static method PhpMyAdmin\\SqlParser\\Utils\\Formatter\:\:mergeFormats\(\) expects array\<int, array\<string, int\|string\>\>, array\<int, array\<string, int\|string\>\>\|bool\|string given\.$#'
identifier: argument.type
count: 1
path: src/Utils/Formatter.php

-
message: '#^Trying to invoke int\<min, \-1\>\|int\<1, max\>\|non\-falsy\-string but it might not be a callable\.$#'
identifier: callable.nonCallable
count: 1
message: '#^Possibly invalid array key type bool\|float\|int\|string\.$#'
identifier: offsetAccess.invalidOffset
count: 7
path: src/Utils/Formatter.php

-
Expand Down Expand Up @@ -2796,7 +2658,7 @@ parameters:
-
message: '#^Dynamic call to static method PHPUnit\\Framework\\Assert\:\:assertEquals\(\)\.$#'
identifier: staticMethod.dynamicCall
count: 4
count: 3
path: tests/Utils/FormatterTest.php

-
Expand Down
Loading
Loading