Skip to content

Commit 1e972b6

Browse files
authored
Add errors caused by the lexer update to the baselines (#9360)
1 parent b7d8229 commit 1e972b6

File tree

2 files changed

+46
-7
lines changed

2 files changed

+46
-7
lines changed

phpstan-baseline.neon

+20
Original file line numberDiff line numberDiff line change
@@ -1335,6 +1335,11 @@ parameters:
13351335
count: 1
13361336
path: lib/Doctrine/ORM/Query/AST/Functions/LowerFunction.php
13371337

1338+
-
1339+
message: "#^Property Doctrine\\\\ORM\\\\Query\\\\AST\\\\Functions\\\\TrimFunction\\:\\:\\$trimChar \\(bool\\) does not accept string\\.$#"
1340+
count: 1
1341+
path: lib/Doctrine/ORM/Query/AST/Functions/TrimFunction.php
1342+
13381343
-
13391344
message: "#^Parameter \\#1 \\$simpleArithmeticExpr of method Doctrine\\\\ORM\\\\Query\\\\SqlWalker\\:\\:walkSimpleArithmeticExpression\\(\\) expects Doctrine\\\\ORM\\\\Query\\\\AST\\\\SimpleArithmeticExpression, Doctrine\\\\ORM\\\\Query\\\\AST\\\\Node given\\.$#"
13401345
count: 1
@@ -1420,6 +1425,16 @@ parameters:
14201425
count: 1
14211426
path: lib/Doctrine/ORM/Query/Parser.php
14221427

1428+
-
1429+
message: "#^Method Doctrine\\\\ORM\\\\Query\\\\Parser\\:\\:ArithmeticTerm\\(\\) should return Doctrine\\\\ORM\\\\Query\\\\AST\\\\ArithmeticTerm but returns Doctrine\\\\ORM\\\\Query\\\\AST\\\\ArithmeticFactor\\|string\\.$#"
1430+
count: 1
1431+
path: lib/Doctrine/ORM/Query/Parser.php
1432+
1433+
-
1434+
message: "#^Method Doctrine\\\\ORM\\\\Query\\\\Parser\\:\\:SimpleArithmeticExpression\\(\\) should return Doctrine\\\\ORM\\\\Query\\\\AST\\\\SimpleArithmeticExpression but returns Doctrine\\\\ORM\\\\Query\\\\AST\\\\ArithmeticTerm\\|string\\.$#"
1435+
count: 1
1436+
path: lib/Doctrine/ORM/Query/Parser.php
1437+
14231438
-
14241439
message: """
14251440
#^PHPDoc tag @return has invalid value \\(AST\\\\BetweenExpression\\|
@@ -1435,6 +1450,11 @@ parameters:
14351450
count: 1
14361451
path: lib/Doctrine/ORM/Query/Parser.php
14371452

1453+
-
1454+
message: "#^Parameter \\#1 \\$tokenType of method Doctrine\\\\ORM\\\\Query\\\\Parser\\:\\:isAggregateFunction\\(\\) expects 1\\|2\\|3\\|4\\|5\\|6\\|7\\|8\\|9\\|10\\|11\\|12\\|13\\|14\\|15\\|16\\|17\\|18\\|19\\|100\\|101\\|102\\|200\\|201\\|202\\|203\\|204\\|205\\|206\\|207\\|208\\|209\\|210\\|211\\|212\\|213\\|214\\|215\\|216\\|217\\|218\\|219\\|220\\|221\\|222\\|223\\|224\\|225\\|226\\|227\\|228\\|229\\|230\\|231\\|232\\|233\\|234\\|235\\|236\\|237\\|238\\|239\\|240\\|241\\|242\\|243\\|244\\|245\\|246\\|247\\|248\\|249\\|250\\|251\\|252\\|253\\|254\\|255\\|256, int\\|string\\|null given\\.$#"
1455+
count: 2
1456+
path: lib/Doctrine/ORM/Query/Parser.php
1457+
14381458
-
14391459
message: "#^Parameter \\#2 \\$stringPattern of class Doctrine\\\\ORM\\\\Query\\\\AST\\\\LikeExpression constructor expects Doctrine\\\\ORM\\\\Query\\\\AST\\\\InputParameter, Doctrine\\\\ORM\\\\Query\\\\AST\\\\Node given\\.$#"
14401460
count: 1

psalm-baseline.xml

+26-7
Original file line numberDiff line numberDiff line change
@@ -2122,6 +2122,9 @@
21222122
<PossiblyNullArrayOffset occurrences="1">
21232123
<code>$class-&gt;associationMappings</code>
21242124
</PossiblyNullArrayOffset>
2125+
<PossiblyNullPropertyAssignmentValue occurrences="1">
2126+
<code>$parser-&gt;getLexer()-&gt;token['value']</code>
2127+
</PossiblyNullPropertyAssignmentValue>
21252128
<PropertyNotSetInConstructor occurrences="2">
21262129
<code>$fieldMapping</code>
21272130
<code>$pathExpression</code>
@@ -2202,6 +2205,9 @@
22022205
</PropertyNotSetInConstructor>
22032206
</file>
22042207
<file src="lib/Doctrine/ORM/Query/AST/Functions/TrimFunction.php">
2208+
<InvalidPropertyAssignmentValue occurrences="1">
2209+
<code>$lexer-&gt;token['value']</code>
2210+
</InvalidPropertyAssignmentValue>
22052211
<PossiblyNullArgument occurrences="1">
22062212
<code>$value</code>
22072213
</PossiblyNullArgument>
@@ -2589,11 +2595,21 @@
25892595
<code>call_user_func($functionClass, $functionName)</code>
25902596
<code>call_user_func($functionClass, $functionName)</code>
25912597
</DocblockTypeContradiction>
2592-
<InvalidNullableReturnType occurrences="1">
2598+
<InvalidArgument occurrences="1">
2599+
<code>$lookaheadType</code>
2600+
</InvalidArgument>
2601+
<InvalidNullableReturnType occurrences="6">
25932602
<code>SelectStatement|UpdateStatement|DeleteStatement</code>
2603+
<code>string</code>
2604+
<code>string</code>
2605+
<code>string</code>
2606+
<code>string</code>
2607+
<code>string</code>
25942608
</InvalidNullableReturnType>
2595-
<InvalidReturnStatement occurrences="9">
2609+
<InvalidReturnStatement occurrences="11">
2610+
<code>$factors[0]</code>
25962611
<code>$primary</code>
2612+
<code>$terms[0]</code>
25972613
<code>$this-&gt;CollectionMemberExpression()</code>
25982614
<code>$this-&gt;ComparisonExpression()</code>
25992615
<code>$this-&gt;EmptyCollectionComparisonExpression()</code>
@@ -2603,9 +2619,11 @@
26032619
<code>$this-&gt;LikeExpression()</code>
26042620
<code>$this-&gt;NullComparisonExpression()</code>
26052621
</InvalidReturnStatement>
2606-
<InvalidReturnType occurrences="2">
2622+
<InvalidReturnType occurrences="4">
26072623
<code>AST\BetweenExpression|</code>
26082624
<code>ArithmeticFactor</code>
2625+
<code>ArithmeticTerm</code>
2626+
<code>SimpleArithmeticExpression</code>
26092627
</InvalidReturnType>
26102628
<InvalidScalarArgument occurrences="3">
26112629
<code>$this-&gt;lexer-&gt;getLiteral($token)</code>
@@ -2643,15 +2661,14 @@
26432661
<code>$this-&gt;ConditionalExpression()</code>
26442662
<code>$this-&gt;ConditionalExpression()</code>
26452663
</PossiblyInvalidPropertyAssignmentValue>
2646-
<PossiblyNullArgument occurrences="23">
2664+
<PossiblyNullArgument occurrences="22">
26472665
<code>$aliasIdentVariable</code>
26482666
<code>$dql</code>
26492667
<code>$field</code>
26502668
<code>$fromClassName</code>
26512669
<code>$functionName</code>
26522670
<code>$functionName</code>
26532671
<code>$functionName</code>
2654-
<code>$lookaheadType</code>
26552672
<code>$resultVariable</code>
26562673
<code>$this-&gt;lexer-&gt;lookahead['value']</code>
26572674
<code>$this-&gt;lexer-&gt;lookahead['value']</code>
@@ -2668,7 +2685,7 @@
26682685
<code>$token['value']</code>
26692686
<code>$token['value']</code>
26702687
</PossiblyNullArgument>
2671-
<PossiblyNullArrayAccess occurrences="75">
2688+
<PossiblyNullArrayAccess occurrences="74">
26722689
<code>$glimpse['type']</code>
26732690
<code>$glimpse['value']</code>
26742691
<code>$lookahead['type']</code>
@@ -2739,12 +2756,14 @@
27392756
<code>$token['type']</code>
27402757
<code>$token['type']</code>
27412758
<code>$token['type']</code>
2742-
<code>$token['type']</code>
27432759
<code>$token['value']</code>
27442760
<code>$token['value']</code>
27452761
<code>$token['value']</code>
27462762
<code>$token['value']</code>
27472763
</PossiblyNullArrayAccess>
2764+
<PossiblyNullPropertyAssignmentValue occurrences="1">
2765+
<code>$value</code>
2766+
</PossiblyNullPropertyAssignmentValue>
27482767
<PossiblyNullReference occurrences="1">
27492768
<code>getNumberOfRequiredParameters</code>
27502769
</PossiblyNullReference>

0 commit comments

Comments
 (0)