diff --git a/phpstan.neon b/phpstan.neon index 97a24bca34b..43bd2c6c136 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -215,7 +215,7 @@ parameters: # class_exists is forbidden to enforce static reflection, but in a compiler pass we want runtime autoloading - message: '#Function "class_exists\(\)" cannot be used/left in the code#' - path: src/DependencyInjection/CompilerPass/VerifyRectorServiceExistsCompilerPass.php + path: src/DependencyInjection/CompilerPass/VerifyRectorServiceExistsCompilerPass.php # known values from other methods - @@ -373,8 +373,6 @@ parameters: - message: '#Do not inherit from abstract class, better use composition#' paths: - - packages/NodeTypeResolver/PhpDocNodeVisitor/*PhpDocNodeVisitor.php - - packages/BetterPhpDocParser/PhpDocNodeVisitor/*PhpDocNodeVisitor.php - packages/BetterPhpDocParser/PhpDocParser/BetterTypeParser.php - packages/BetterPhpDocParser/ValueObject/Parser/BetterTokenIterator.php @@ -414,10 +412,6 @@ parameters: - '#Method Rector\\Core\\Tests\\DependencyInjection\\ConfigurableRectorImportConfigCallsMergeTest\:\:provideData\(\) return type has no value type specified in iterable type Iterator#' - - - message: '#Use separate function calls with readable variable names#' - path: src/FileSystem/FilesFinder.php - # fixed in dev-main - message: '#Use dependency injection instead of dependency juggling#' @@ -454,10 +448,6 @@ parameters: message: '#Class cognitive complexity is 33, keep it under 30#' path: src/Rector/AbstractRector.php - - # fixed in dev-main - - '#Class like namespace "Rector\\(.*?)" does not follow PSR\-4 configuration in composer\.json#' - # deserves better architecture - message: '#Do not use chained method calls#' @@ -489,23 +479,12 @@ parameters: message: '#Access to an undefined property PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PhpDocChildNode\:\:\$value#' path: packages/BetterPhpDocParser/PhpDocInfo/PhpDocInfo.php #348 - - - message: '#Class with base "StaticTypeMapper" name is already used in "Rector\\StaticTypeMapper\\StaticTypeMapper", "Rector\\PHPStanStaticTypeMapper\\TypeMapper\\StaticTypeMapper"\. Use unique name to make classes easy to recognize#' - path: packages/PHPStanStaticTypeMapper/TypeMapper/StaticTypeMapper.php #21 - - '#"@var_export\(new \\Rector\\Caching\\ValueObject\\CacheItem\(\$variableKey, \$data\), true\)" is forbidden to use#' - # resolve same named classes later - - '#Class with base "UnionTypeMapper" name is already used in "Rector\\StaticTypeMapper\\PhpDocParser\\UnionTypeMapper", "Rector\\PHPStanStaticTypeMapper\\TypeMapper\\UnionTypeMapper"\. Use unique name to make classes easy to recognize#' - - # checking internal class - - message: '#Instead of "instanceof/is_a\(\)" use ReflectionProvider service or "\(new ObjectType\(\)\)\-\>isSuperTypeOf\(\)" for static reflection to work#' - path: packages/Caching/ValueObject/Storage/FileCacheStorage.php - - # cache hacking - - '#"@var_export\(new \\Symplify\\EasyCodingStandard\\Caching\\ValueObject\\CacheItem\(\$variableKey, \$data\), true\)" is forbidden to use#' + message: '#Class with base "UnionTypeMapper" name is already used in "Rector\\PHPStanStaticTypeMapper\\TypeMapper\\UnionTypeMapper", "Rector\\StaticTypeMapper\\PhpDocParser\\UnionTypeMapper"\. Use unique name to make classes easy to recognize#' + path: packages/StaticTypeMapper/PhpDocParser/UnionTypeMapper.php #17 - - message: '#Class "Doctrine\\DBAL\\Platforms\\MySqlPlatform" used in annotation is missing#' - path: rules/TypeDeclaration/TypeInferer/PropertyTypeInferer/DoctrineColumnPropertyTypeInferer.php + message: '#Class with base "StaticTypeMapper" name is already used in "Rector\\PHPStanStaticTypeMapper\\TypeMapper\\StaticTypeMapper", "Rector\\StaticTypeMapper\\StaticTypeMapper"\. Use unique name to make classes easy to recognize#' + path: packages/StaticTypeMapper/StaticTypeMapper.php #31