Skip to content

Commit

Permalink
Fix Psalm/PHPStan errors
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus committed Jun 22, 2021
1 parent 5e91eea commit b9f7e09
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 5 deletions.
40 changes: 35 additions & 5 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ parameters:
count: 1
path: lib/Doctrine/ORM/Cache/TimestampQueryCacheValidator.php

-
message: "#^Class Doctrine\\\\Common\\\\Cache\\\\ArrayCache not found\\.$#"
count: 2
path: lib/Doctrine/ORM/Configuration.php

-
message: "#^Parameter \\#2 \\$cache of class Doctrine\\\\Common\\\\Annotations\\\\CachedReader constructor expects Doctrine\\\\Common\\\\Cache\\\\Cache, Doctrine\\\\Common\\\\Cache\\\\ArrayCache given\\.$#"
count: 1
path: lib/Doctrine/ORM/Configuration.php

-
message: "#^Method Doctrine\\\\Persistence\\\\ObjectManager\\:\\:find\\(\\) invoked with 4 parameters, 2 required\\.$#"
count: 1
Expand Down Expand Up @@ -1415,6 +1425,11 @@ parameters:
count: 1
path: lib/Doctrine/ORM/Query/Parser.php

-
message: "#^Else branch is unreachable because ternary operator condition is always true\\.$#"
count: 3
path: lib/Doctrine/ORM/Query/Parser.php

-
message: "#^Method Doctrine\\\\ORM\\\\Query\\\\Parser\\:\\:ArithmeticFactor\\(\\) should return Doctrine\\\\ORM\\\\Query\\\\AST\\\\ArithmeticFactor but returns Doctrine\\\\ORM\\\\Query\\\\AST\\\\Node\\|string\\.$#"
count: 1
Expand All @@ -1436,11 +1451,6 @@ parameters:
count: 1
path: lib/Doctrine/ORM/Query/Parser.php

-
message: "#^Else branch is unreachable because ternary operator condition is always true\\.$#"
count: 3
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 Expand Up @@ -2016,11 +2026,31 @@ parameters:
count: 2
path: lib/Doctrine/ORM/QueryBuilder.php

-
message: "#^Class Doctrine\\\\Common\\\\Cache\\\\ApcCache not found\\.$#"
count: 1
path: lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php

-
message: "#^Class Doctrine\\\\Common\\\\Cache\\\\XcacheCache not found\\.$#"
count: 1
path: lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php

-
message: "#^Else branch is unreachable because ternary operator condition is always true\\.$#"
count: 1
path: lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryRegionCommand.php

-
message: "#^Class Doctrine\\\\Common\\\\Cache\\\\ApcCache not found\\.$#"
count: 1
path: lib/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php

-
message: "#^Class Doctrine\\\\Common\\\\Cache\\\\XcacheCache not found\\.$#"
count: 1
path: lib/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php

-
message: "#^Parameter \\#1 \\$metadata of method Doctrine\\\\ORM\\\\Tools\\\\Export\\\\Driver\\\\AbstractExporter\\:\\:setMetadata\\(\\) expects array\\<int, Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadata\\>, array\\<int, Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadataInfo\\> given\\.$#"
count: 1
Expand Down
7 changes: 7 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,12 @@
<file name="lib/Doctrine/ORM/Mapping/Driver/AttributeReader.php"/>
</errorLevel>
</NullArgument>
<UndefinedClass>
<errorLevel type="suppress">
<referencedClass name="Doctrine\Common\Cache\ApcCache"/>
<referencedClass name="Doctrine\Common\Cache\ArrayCache"/>
<referencedClass name="Doctrine\Common\Cache\XcacheCache"/>
</errorLevel>
</UndefinedClass>
</issueHandlers>
</psalm>

0 comments on commit b9f7e09

Please sign in to comment.