Skip to content

Commit

Permalink
Update PHPStan baseline to ignore specific errors
Browse files Browse the repository at this point in the history
Added entries to PHPStan baseline configuration to ignore specific errors related to type hints and method definitions in several files. This helps to bypass known issues and keeps the focus on critical errors during static analysis.
  • Loading branch information
raffaelecarelle committed Nov 1, 2024
1 parent a38d2f9 commit 34e9e49
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,2 +1,36 @@
parameters:
ignoreErrors: []
ignoreErrors:
-
message: "#^Parameter \\#1 \\$className of method PHPUnitTestGenerator\\\\TestClassGenerator\\:\\:generate\\(\\) expects class\\-string, string given\\.$#"
count: 1
path: lib/Command/GenerateTestClassCommand.php

-
message: "#^Property PHPUnitTestGenerator\\\\TestClassGenerator\\:\\:\\$reflectionClass with generic class ReflectionClass does not specify its types\\: T$#"
count: 1
path: lib/TestClassGenerator.php

-
message: "#^Call to an undefined method ReflectionType\\:\\:getName\\(\\)\\.$#"
count: 2
path: lib/TestClassMetadataParser.php

-
message: "#^Call to an undefined method ReflectionType\\:\\:isBuiltin\\(\\)\\.$#"
count: 1
path: lib/TestClassMetadataParser.php

-
message: "#^Method PHPUnitTestGenerator\\\\TestClassMetadataParser\\:\\:generateTypeRandomValue\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: lib/TestClassMetadataParser.php

-
message: "#^Parameter \\#1 \\$objectOrClass of class ReflectionClass constructor expects class\\-string\\<T of object\\>\\|T of object, string given\\.$#"
count: 1
path: lib/TestClassMetadataParser.php

-
message: "#^Property PHPUnitTestGenerator\\\\TestClassMetadataParser\\:\\:\\$reflectionClass with generic class ReflectionClass does not specify its types\\: T$#"
count: 1
path: lib/TestClassMetadataParser.php

0 comments on commit 34e9e49

Please sign in to comment.