Skip to content

Commit

Permalink
[PHPStan] Clean up ignore errors in phpstan.neon (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Jun 17, 2021
1 parent 6c3a521 commit a41a5ba
Showing 1 changed file with 5 additions and 26 deletions.
31 changes: 5 additions & 26 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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
-
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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#'
Expand Down Expand Up @@ -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#'
Expand Down Expand Up @@ -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\(<desired_type\>\)\)\-\>isSuperTypeOf\(<element_type\>\)" 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

0 comments on commit a41a5ba

Please sign in to comment.