Skip to content

Commit

Permalink
Add errors caused by the lexer update to the baselines (#9360)
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus authored Jan 12, 2022
1 parent b7d8229 commit 1e972b6
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 7 deletions.
20 changes: 20 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -1335,6 +1335,11 @@ parameters:
count: 1
path: lib/Doctrine/ORM/Query/AST/Functions/LowerFunction.php

-
message: "#^Property Doctrine\\\\ORM\\\\Query\\\\AST\\\\Functions\\\\TrimFunction\\:\\:\\$trimChar \\(bool\\) does not accept string\\.$#"
count: 1
path: lib/Doctrine/ORM/Query/AST/Functions/TrimFunction.php

-
message: "#^Parameter \\#1 \\$simpleArithmeticExpr of method Doctrine\\\\ORM\\\\Query\\\\SqlWalker\\:\\:walkSimpleArithmeticExpression\\(\\) expects Doctrine\\\\ORM\\\\Query\\\\AST\\\\SimpleArithmeticExpression, Doctrine\\\\ORM\\\\Query\\\\AST\\\\Node given\\.$#"
count: 1
Expand Down Expand Up @@ -1420,6 +1425,16 @@ parameters:
count: 1
path: lib/Doctrine/ORM/Query/Parser.php

-
message: "#^Method Doctrine\\\\ORM\\\\Query\\\\Parser\\:\\:ArithmeticTerm\\(\\) should return Doctrine\\\\ORM\\\\Query\\\\AST\\\\ArithmeticTerm but returns Doctrine\\\\ORM\\\\Query\\\\AST\\\\ArithmeticFactor\\|string\\.$#"
count: 1
path: lib/Doctrine/ORM/Query/Parser.php

-
message: "#^Method Doctrine\\\\ORM\\\\Query\\\\Parser\\:\\:SimpleArithmeticExpression\\(\\) should return Doctrine\\\\ORM\\\\Query\\\\AST\\\\SimpleArithmeticExpression but returns Doctrine\\\\ORM\\\\Query\\\\AST\\\\ArithmeticTerm\\|string\\.$#"
count: 1
path: lib/Doctrine/ORM/Query/Parser.php

-
message: """
#^PHPDoc tag @return has invalid value \\(AST\\\\BetweenExpression\\|
Expand All @@ -1435,6 +1450,11 @@ parameters:
count: 1
path: lib/Doctrine/ORM/Query/Parser.php

-
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\\.$#"
count: 2
path: lib/Doctrine/ORM/Query/Parser.php

-
message: "#^Parameter \\#2 \\$stringPattern of class Doctrine\\\\ORM\\\\Query\\\\AST\\\\LikeExpression constructor expects Doctrine\\\\ORM\\\\Query\\\\AST\\\\InputParameter, Doctrine\\\\ORM\\\\Query\\\\AST\\\\Node given\\.$#"
count: 1
Expand Down
33 changes: 26 additions & 7 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2122,6 +2122,9 @@
<PossiblyNullArrayOffset occurrences="1">
<code>$class-&gt;associationMappings</code>
</PossiblyNullArrayOffset>
<PossiblyNullPropertyAssignmentValue occurrences="1">
<code>$parser-&gt;getLexer()-&gt;token['value']</code>
</PossiblyNullPropertyAssignmentValue>
<PropertyNotSetInConstructor occurrences="2">
<code>$fieldMapping</code>
<code>$pathExpression</code>
Expand Down Expand Up @@ -2202,6 +2205,9 @@
</PropertyNotSetInConstructor>
</file>
<file src="lib/Doctrine/ORM/Query/AST/Functions/TrimFunction.php">
<InvalidPropertyAssignmentValue occurrences="1">
<code>$lexer-&gt;token['value']</code>
</InvalidPropertyAssignmentValue>
<PossiblyNullArgument occurrences="1">
<code>$value</code>
</PossiblyNullArgument>
Expand Down Expand Up @@ -2589,11 +2595,21 @@
<code>call_user_func($functionClass, $functionName)</code>
<code>call_user_func($functionClass, $functionName)</code>
</DocblockTypeContradiction>
<InvalidNullableReturnType occurrences="1">
<InvalidArgument occurrences="1">
<code>$lookaheadType</code>
</InvalidArgument>
<InvalidNullableReturnType occurrences="6">
<code>SelectStatement|UpdateStatement|DeleteStatement</code>
<code>string</code>
<code>string</code>
<code>string</code>
<code>string</code>
<code>string</code>
</InvalidNullableReturnType>
<InvalidReturnStatement occurrences="9">
<InvalidReturnStatement occurrences="11">
<code>$factors[0]</code>
<code>$primary</code>
<code>$terms[0]</code>
<code>$this-&gt;CollectionMemberExpression()</code>
<code>$this-&gt;ComparisonExpression()</code>
<code>$this-&gt;EmptyCollectionComparisonExpression()</code>
Expand All @@ -2603,9 +2619,11 @@
<code>$this-&gt;LikeExpression()</code>
<code>$this-&gt;NullComparisonExpression()</code>
</InvalidReturnStatement>
<InvalidReturnType occurrences="2">
<InvalidReturnType occurrences="4">
<code>AST\BetweenExpression|</code>
<code>ArithmeticFactor</code>
<code>ArithmeticTerm</code>
<code>SimpleArithmeticExpression</code>
</InvalidReturnType>
<InvalidScalarArgument occurrences="3">
<code>$this-&gt;lexer-&gt;getLiteral($token)</code>
Expand Down Expand Up @@ -2643,15 +2661,14 @@
<code>$this-&gt;ConditionalExpression()</code>
<code>$this-&gt;ConditionalExpression()</code>
</PossiblyInvalidPropertyAssignmentValue>
<PossiblyNullArgument occurrences="23">
<PossiblyNullArgument occurrences="22">
<code>$aliasIdentVariable</code>
<code>$dql</code>
<code>$field</code>
<code>$fromClassName</code>
<code>$functionName</code>
<code>$functionName</code>
<code>$functionName</code>
<code>$lookaheadType</code>
<code>$resultVariable</code>
<code>$this-&gt;lexer-&gt;lookahead['value']</code>
<code>$this-&gt;lexer-&gt;lookahead['value']</code>
Expand All @@ -2668,7 +2685,7 @@
<code>$token['value']</code>
<code>$token['value']</code>
</PossiblyNullArgument>
<PossiblyNullArrayAccess occurrences="75">
<PossiblyNullArrayAccess occurrences="74">
<code>$glimpse['type']</code>
<code>$glimpse['value']</code>
<code>$lookahead['type']</code>
Expand Down Expand Up @@ -2739,12 +2756,14 @@
<code>$token['type']</code>
<code>$token['type']</code>
<code>$token['type']</code>
<code>$token['type']</code>
<code>$token['value']</code>
<code>$token['value']</code>
<code>$token['value']</code>
<code>$token['value']</code>
</PossiblyNullArrayAccess>
<PossiblyNullPropertyAssignmentValue occurrences="1">
<code>$value</code>
</PossiblyNullPropertyAssignmentValue>
<PossiblyNullReference occurrences="1">
<code>getNumberOfRequiredParameters</code>
</PossiblyNullReference>
Expand Down

0 comments on commit 1e972b6

Please sign in to comment.