Skip to content

Commit a8eb199

Browse files
committed
Update baselines
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
1 parent 5e02807 commit a8eb199

File tree

2 files changed

+70
-111
lines changed

2 files changed

+70
-111
lines changed

phpstan-baseline.neon

Lines changed: 50 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ parameters:
99
-
1010
message: '#^Cannot call method remove\(\) on PhpMyAdmin\\SqlParser\\Components\\OptionsArray\|null\.$#'
1111
identifier: method.nonObject
12-
count: 3
12+
count: 1
1313
path: src/Components/AlterOperation.php
1414

1515
-
@@ -156,36 +156,6 @@ parameters:
156156
count: 1
157157
path: src/Context.php
158158

159-
-
160-
message: '#^Binary operation "\." between mixed and mixed results in an error\.$#'
161-
identifier: binaryOp.invalid
162-
count: 2
163-
path: src/Lexer.php
164-
165-
-
166-
message: '#^Binary operation "\." between string and mixed results in an error\.$#'
167-
identifier: binaryOp.invalid
168-
count: 2
169-
path: src/Lexer.php
170-
171-
-
172-
message: '#^Binary operation "\.\=" between mixed and mixed results in an error\.$#'
173-
identifier: assignOp.invalid
174-
count: 9
175-
path: src/Lexer.php
176-
177-
-
178-
message: '#^Binary operation "\.\=" between mixed and string results in an error\.$#'
179-
identifier: assignOp.invalid
180-
count: 2
181-
path: src/Lexer.php
182-
183-
-
184-
message: '#^Binary operation "\.\=" between string and mixed results in an error\.$#'
185-
identifier: assignOp.invalid
186-
count: 11
187-
path: src/Lexer.php
188-
189159
-
190160
message: '#^Cannot access property \$type on PhpMyAdmin\\SqlParser\\Token\|null\.$#'
191161
identifier: property.nonObject
@@ -240,54 +210,6 @@ parameters:
240210
count: 1
241211
path: src/Lexer.php
242212

243-
-
244-
message: '#^Parameter \#1 \$character of static method PhpMyAdmin\\SqlParser\\Context\:\:isString\(\) expects string, mixed given\.$#'
245-
identifier: argument.type
246-
count: 1
247-
path: src/Lexer.php
248-
249-
-
250-
message: '#^Parameter \#1 \$character of static method PhpMyAdmin\\SqlParser\\Context\:\:isSymbol\(\) expects string, mixed given\.$#'
251-
identifier: argument.type
252-
count: 1
253-
path: src/Lexer.php
254-
255-
-
256-
message: '#^Parameter \#1 \$character of static method PhpMyAdmin\\SqlParser\\Context\:\:isWhitespace\(\) expects string, mixed given\.$#'
257-
identifier: argument.type
258-
count: 5
259-
path: src/Lexer.php
260-
261-
-
262-
message: '#^Parameter \#1 \$string of static method PhpMyAdmin\\SqlParser\\Context\:\:isComment\(\) expects string, mixed given\.$#'
263-
identifier: argument.type
264-
count: 2
265-
path: src/Lexer.php
266-
267-
-
268-
message: '#^Parameter \#1 \$string of static method PhpMyAdmin\\SqlParser\\Context\:\:isSeparator\(\) expects string, mixed given\.$#'
269-
identifier: argument.type
270-
count: 4
271-
path: src/Lexer.php
272-
273-
-
274-
message: '#^Parameter \#1 \$token of class PhpMyAdmin\\SqlParser\\Token constructor expects string, mixed given\.$#'
275-
identifier: argument.type
276-
count: 7
277-
path: src/Lexer.php
278-
279-
-
280-
message: '#^Parameter \#2 \$str of method PhpMyAdmin\\SqlParser\\Lexer\:\:error\(\) expects string, mixed given\.$#'
281-
identifier: argument.type
282-
count: 2
283-
path: src/Lexer.php
284-
285-
-
286-
message: '#^Parameter \#2 \.\.\.\$values of function sprintf expects bool\|float\|int\|string\|null, mixed given\.$#'
287-
identifier: argument.type
288-
count: 1
289-
path: src/Lexer.php
290-
291213
-
292214
message: '#^Property PhpMyAdmin\\SqlParser\\Token\:\:\$keyword \(string\|null\) does not accept bool\|float\|int\|string\.$#'
293215
identifier: assign.propertyType
@@ -876,6 +798,12 @@ parameters:
876798
count: 1
877799
path: src/Parsers/OptionsArrays.php
878800

801+
-
802+
message: '#^Offset ''value'' might not exist on array\{expr\: string\}\|array\{name\: string, equals\: bool, expr\: string, value\: string\|null\}\.$#'
803+
identifier: offsetAccess.notFound
804+
count: 1
805+
path: src/Parsers/OptionsArrays.php
806+
879807
-
880808
message: '#^Only booleans are allowed in &&, mixed given on the right side\.$#'
881809
identifier: booleanAnd.rightNotBoolean
@@ -889,21 +817,39 @@ parameters:
889817
path: src/Parsers/OptionsArrays.php
890818

891819
-
892-
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\>\.$#'
820+
message: '#^Possibly invalid array key type mixed\.$#'
821+
identifier: offsetAccess.invalidOffset
822+
count: 14
823+
path: src/Parsers/OptionsArrays.php
824+
825+
-
826+
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\>\.$#'
893827
identifier: assign.propertyType
894-
count: 2
828+
count: 1
895829
path: src/Parsers/OptionsArrays.php
896830

897831
-
898-
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\>\.$#'
832+
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\>\.$#'
899833
identifier: assign.propertyType
900834
count: 1
901835
path: src/Parsers/OptionsArrays.php
902836

903837
-
904-
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\>\.$#'
838+
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\>\.$#'
905839
identifier: assign.propertyType
906-
count: 3
840+
count: 1
841+
path: src/Parsers/OptionsArrays.php
842+
843+
-
844+
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\>\.$#'
845+
identifier: assign.propertyType
846+
count: 2
847+
path: src/Parsers/OptionsArrays.php
848+
849+
-
850+
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\>\.$#'
851+
identifier: assign.propertyType
852+
count: 1
907853
path: src/Parsers/OptionsArrays.php
908854

909855
-
@@ -1129,15 +1075,9 @@ parameters:
11291075
path: src/Statement.php
11301076

11311077
-
1132-
message: '#^Only booleans are allowed in an if condition, int\<0, 1\> given\.$#'
1078+
message: '#^Only booleans are allowed in an if condition, int given\.$#'
11331079
identifier: if.condNotBoolean
1134-
count: 1
1135-
path: src/Statement.php
1136-
1137-
-
1138-
message: '#^Only booleans are allowed in an if condition, int\<0, 2\> given\.$#'
1139-
identifier: if.condNotBoolean
1140-
count: 1
1080+
count: 2
11411081
path: src/Statement.php
11421082

11431083
-
@@ -1152,12 +1092,6 @@ parameters:
11521092
count: 1
11531093
path: src/Statement.php
11541094

1155-
-
1156-
message: '#^Variable property access on \$this\(PhpMyAdmin\\SqlParser\\Statement\)\.$#'
1157-
identifier: property.dynamicName
1158-
count: 5
1159-
path: src/Statement.php
1160-
11611095
-
11621096
message: '#^Argument of an invalid type array\<PhpMyAdmin\\SqlParser\\Components\\AlterOperation\>\|null supplied for foreach, only iterables are supported\.$#'
11631097
identifier: foreach.nonIterable
@@ -1290,12 +1224,6 @@ parameters:
12901224
count: 1
12911225
path: src/Statements/CreateStatement.php
12921226

1293-
-
1294-
message: '#^Variable property access on \$this\(PhpMyAdmin\\SqlParser\\Statements\\CreateStatement\)\.$#'
1295-
identifier: property.dynamicName
1296-
count: 3
1297-
path: src/Statements/CreateStatement.php
1298-
12991227
-
13001228
message: '#^Argument of an invalid type array\<PhpMyAdmin\\SqlParser\\Components\\Expression\>\|null supplied for foreach, only iterables are supported\.$#'
13011229
identifier: foreach.nonIterable
@@ -1590,12 +1518,6 @@ parameters:
15901518
count: 1
15911519
path: src/Statements/SelectStatement.php
15921520

1593-
-
1594-
message: '#^Variable property access on \$this\(PhpMyAdmin\\SqlParser\\Statements\\SelectStatement\)\.$#'
1595-
identifier: property.dynamicName
1596-
count: 1
1597-
path: src/Statements/SelectStatement.php
1598-
15991521
-
16001522
message: '#^Cannot call method build\(\) on PhpMyAdmin\\SqlParser\\Components\\OptionsArray\|null\.$#'
16011523
identifier: method.nonObject
@@ -1656,6 +1578,18 @@ parameters:
16561578
count: 1
16571579
path: src/Statements/WithStatement.php
16581580

1581+
-
1582+
message: '#^Possibly invalid array key type bool\|float\|int\|string\.$#'
1583+
identifier: offsetAccess.invalidOffset
1584+
count: 1
1585+
path: src/Statements/WithStatement.php
1586+
1587+
-
1588+
message: '#^Possibly invalid array key type bool\|float\|int\|string\|null\.$#'
1589+
identifier: offsetAccess.invalidOffset
1590+
count: 2
1591+
path: src/Statements/WithStatement.php
1592+
16591593
-
16601594
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
16611595
identifier: empty.notAllowed
@@ -1872,6 +1806,12 @@ parameters:
18721806
count: 4
18731807
path: src/Utils/Formatter.php
18741808

1809+
-
1810+
message: '#^Possibly invalid array key type bool\|float\|int\|string\.$#'
1811+
identifier: offsetAccess.invalidOffset
1812+
count: 7
1813+
path: src/Utils/Formatter.php
1814+
18751815
-
18761816
message: '#^Trying to invoke non\-empty\-string but it might not be a callable\.$#'
18771817
identifier: callable.nonCallable

psalm-baseline.xml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="6.10.3@90b5b9f5e7c8e441b191d3c82c58214753d7c7c1">
2+
<files psalm-version="6.15.1@28dc127af1b5aecd52314f6f645bafc10d0e11f9">
33
<file src="src/Components/AlterOperation.php">
44
<PossiblyNullReference>
55
<code><![CDATA[has]]></code>
@@ -185,6 +185,7 @@
185185
<PossiblyNullArrayOffset>
186186
<code><![CDATA[$list->tokens]]></code>
187187
<code><![CDATA[self::STATEMENT_PARSERS]]></code>
188+
<code><![CDATA[self::STATEMENT_PARSERS]]></code>
188189
</PossiblyNullArrayOffset>
189190
<PossiblyNullOperand>
190191
<code><![CDATA[$list->idx]]></code>
@@ -337,6 +338,9 @@
337338
<code><![CDATA[$field]]></code>
338339
<code><![CDATA[$options['field']]]></code>
339340
</MixedAssignment>
341+
<PossiblyNullArrayOffset>
342+
<code><![CDATA[Parser::STATEMENT_PARSERS]]></code>
343+
</PossiblyNullArrayOffset>
340344
<PossiblyNullOperand>
341345
<code><![CDATA[$ret->expr]]></code>
342346
<code><![CDATA[$ret->expr]]></code>
@@ -395,6 +399,10 @@
395399
<PossiblyInvalidPropertyAssignmentValue>
396400
<code><![CDATA[ArrayObjs::parse($parser, $list)]]></code>
397401
</PossiblyInvalidPropertyAssignmentValue>
402+
<PossiblyNullArrayOffset>
403+
<code><![CDATA[JoinKeyword::JOINS]]></code>
404+
<code><![CDATA[JoinKeyword::JOINS]]></code>
405+
</PossiblyNullArrayOffset>
398406
<RiskyTruthyFalsyComparison>
399407
<code><![CDATA[empty($expr->type)]]></code>
400408
</RiskyTruthyFalsyComparison>
@@ -550,6 +558,9 @@
550558
<code><![CDATA[array<string, int>]]></code>
551559
<code><![CDATA[array_flip($clauses)]]></code>
552560
</MixedReturnTypeCoercion>
561+
<PossiblyNullArrayOffset>
562+
<code><![CDATA[Parser::STATEMENT_PARSERS]]></code>
563+
</PossiblyNullArrayOffset>
553564
<PossiblyUnusedReturnValue>
554565
<code><![CDATA[bool]]></code>
555566
</PossiblyUnusedReturnValue>
@@ -799,6 +810,7 @@
799810
</MixedReturnTypeCoercion>
800811
<PossiblyNullArrayOffset>
801812
<code><![CDATA[$tables[$thisDb]]]></code>
813+
<code><![CDATA[Parser::STATEMENT_PARSERS]]></code>
802814
</PossiblyNullArrayOffset>
803815
<PossiblyUnusedProperty>
804816
<code><![CDATA[$endOptions]]></code>
@@ -1024,6 +1036,10 @@
10241036
<code><![CDATA[$text]]></code>
10251037
<code><![CDATA[$text]]></code>
10261038
</MixedReturnStatement>
1039+
<PossiblyNullArrayOffset>
1040+
<code><![CDATA[Parser::KEYWORD_PARSERS]]></code>
1041+
<code><![CDATA[Parser::STATEMENT_PARSERS]]></code>
1042+
</PossiblyNullArrayOffset>
10271043
<PossiblyNullOperand>
10281044
<code><![CDATA[$indent]]></code>
10291045
<code><![CDATA[$indent]]></code>
@@ -1066,6 +1082,9 @@
10661082
<code><![CDATA[$i]]></code>
10671083
</NullableReturnStatement>
10681084
<PossiblyNullArrayOffset>
1085+
<code><![CDATA[$clauses]]></code>
1086+
<code><![CDATA[$clauses]]></code>
1087+
<code><![CDATA[$clauses]]></code>
10691088
<code><![CDATA[$list->tokens]]></code>
10701089
<code><![CDATA[$list->tokens]]></code>
10711090
</PossiblyNullArrayOffset>

0 commit comments

Comments
 (0)