mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-19 06:18:07 +01:00
88 lines
5.9 KiB
Plaintext
88 lines
5.9 KiB
Plaintext
parameters:
|
|
ignoreErrors:
|
|
# the # after each ignored error is the number of occurrences
|
|
- '#Parameter \#2 \$filePath of method Rector\\(.*?)::decorateNodesFromFile\(\) expects string, string\|false given#'
|
|
|
|
# missuse of interface and class
|
|
- '#Parameter \#1 (.*?) expects Symfony\\Component\\DependencyInjection\\ContainerBuilder, Symfony\\Component\\DependencyInjection\\ContainerInterface given#' # 2
|
|
- '#Method Rector\\Symfony\\Bridge\\DefaultAnalyzedSymfonyApplicationContainer::getContainer\(\) should return Symfony\\Component\\DependencyInjection\\ContainerBuilder but returns Symfony\\Component\\DependencyInjection\\Container#' # 1
|
|
|
|
# 0.10.2
|
|
# false positives & ->toString() methods
|
|
- '#Cannot cast PhpParser\\Node\\Expr\|string to string#' # 8
|
|
- '#Offset string does not exist on string#' # 1
|
|
- '#Cannot cast PhpParser\\Node\\Expr\\Error\|PhpParser\\Node\\Identifier to string#'
|
|
- '#Cannot cast PhpParser\\Node\\Expr\|PhpParser\\Node\\Identifier to string#' # 4
|
|
- '#Cannot cast PhpParser\\Node\\Expr\|PhpParser\\Node\\Identifier|string to string#' # 3
|
|
- '#Cannot cast PhpParser\\Node\\Expr\|PhpParser\\Node\\Name to string#'
|
|
- '#Array \(array<array<PhpParser\\Node\\Stmt>>\) does not accept array<PhpParser\\Node\\Stmt|null>#'
|
|
|
|
# already fixed, invalidated cache?
|
|
- '#Access to an undefined property PhpParser\\Node\\Expr::\$args#'
|
|
|
|
# symfony container autowire interface falsy
|
|
- '#Call to an undefined method Symfony\\Component\\DependencyInjection\\ContainerInterface::getServiceIds\(\)#'
|
|
|
|
# nette container
|
|
- '#Method Rector\\NodeTypeResolver\\DependencyInjection\\PHPStanServicesFactory::create(.*?)() should return (.*?) but returns object#'
|
|
|
|
# irelevant
|
|
- '#Call to function in_array\(\) with arguments string, array<array<string\|false>> and true will always evaluate to false#'
|
|
|
|
# known values
|
|
- '#Access to an undefined property PhpParser\\Node\\Expr\\MethodCall\|PhpParser\\Node\\Stmt\\ClassMethod::\$params#'
|
|
- '#Cannot call method getName\(\) on PHPStan\\Reflection\\ClassReflection\|null#' # 1
|
|
- '#Parameter \#1 \$classReflection of method Rector\\NodeTypeResolver\\Reflection\\ClassReflectionTypesResolver::resolve\(\) expects PHPStan\\Reflection\\ClassReflection, PHPStan\\Reflection\\ClassReflection|null given#'
|
|
- '#Cannot call method getAttribute\(\) on PhpParser\\Node\\Name\|null#'
|
|
- '#Cannot call method getBasename\(\) on Symfony\\Component\\Finder\\SplFileInfo\|null#'
|
|
- '#Cannot call method getText\(\) on PhpParser\\Comment\\Doc\|null#'
|
|
|
|
# Error php-parser token
|
|
- '#Access to an undefined property PhpParser\\Node\\Expr\\Error\|PhpParser\\Node\\Expr\\Variable::\$name#'
|
|
|
|
# SplFileInfo::getRealPath() false positive
|
|
- '#Parameter \#1 \$file of function file_put_contents expects string, string\|false given#'
|
|
- '#Parameter \#1 \$filePath of method Rector\\Parser\\Parser::parseFile\(\) expects string, string\|false given#'
|
|
|
|
# false positive, has annotation type above (@todo recheck for possible ignored positives)
|
|
- '#Access to an undefined property PhpParser\\Node::\$name#' # 11
|
|
- '#Parameter \#1 \$node of method Rector\\NodeAnalyzer\\ClassConstAnalyzer::isNames\(\) expects PhpParser\\Node\\Expr\\ClassConstFetch, PhpParser\\Node given#' # 1
|
|
|
|
# subtype
|
|
- '#Property PhpParser\\Node\\Param::\$type \(PhpParser\\Node\\Name|PhpParser\\Node\\NullableType\|string\|null\) does not accept PhpParser\\Node\\Identifier|PhpParser\\Node\\Name\|PhpParser\\Node\\NullableType#' # 3
|
|
|
|
# intentionally incorrect - part of the test
|
|
- '#Parameter \#2 \$codeSamples of class Rector\\RectorDefinition\\RectorDefinition constructor expects array<Rector\\Contract\\RectorDefinition\\CodeSampleInterface>, array<int, stdClass> given#' # 1
|
|
|
|
# invalid interface type resolution
|
|
- '#Method Rector\\NodeTraverser\\RectorNodeTraverser::getRectors\(\) should return array<Rector\\Contract\\Rector\\PhpRectorInterface> but returns array<PhpParser\\NodeVisitor>#' # 1
|
|
|
|
# known values
|
|
- '#Access to an undefined property PHPStan\\PhpDocParser\\Ast\\Node::\$name#' # 2
|
|
|
|
- '#Method Rector\\Node\\NodeFactory::createNullConstant\(\) should return PhpParser\\Node\\Expr\\ConstFetch but returns PhpParser\\Node\\Expr#' # 1
|
|
- '#Method Rector\\Node\\NodeFactory::createNamespace\(\) should return PhpParser\\Node\\Stmt\\Namespace_ but returns PhpParser\\Node#' # 1
|
|
- '#Method Rector\\Utils\\BetterNodeFinder::findFirstAncestorInstanceOf\(\) should return PhpParser\\Node\|null but returns object#' # 1
|
|
- '#Property Rector\\NodeTypeResolver\\NodeVisitor\\NamespaceNodeVisitor::\$useNodes \(array<PhpParser\\Node\\Stmt\\Use_>\) does not accept array<PhpParser\\Node>#' # 1
|
|
- '#Parameter \#1 \$node of method Rector\\NodeTypeResolver\\NodeTypeResolver::resolve\(\) expects PhpParser\\Node, PhpParser\\Node\\Expr|string given#' # 3
|
|
|
|
# buggy
|
|
- '#Access to an undefined property PhpParser\\Node\\Expr::\$value#' # 2
|
|
- '#Access to an undefined property PhpParser\\Node\\Expr::\$(name|var)#' # 2
|
|
|
|
# tests - known values
|
|
- '#Parameter \#1 \$code of method PhpParser\\Parser::parse\(\) expects string, string\|false given#' # 1
|
|
|
|
# too strict
|
|
- '#Parameter \#1 \$currentWorkingDirectory of class PHPStan\\DependencyInjection\\ContainerFactory constructor expects string, string\|false given#' # 1
|
|
|
|
excludes_analyse:
|
|
# test files
|
|
- '*tests/Rector/MethodCall/MethodNameReplacerRector/**/SomeClass.php'
|
|
- '*packages/BetterReflection/tests/Reflector/NotLoadedSource/SomeClass.php'
|
|
- 'packages/NodeTypeResolver/tests/PerNodeTypeResolver/VariableTypeResolver/Source/NewClass.php'
|
|
# tests files
|
|
- '*tests/**/Wrong/*'
|
|
- '*tests/**/Correct/*'
|
|
- '*tests/**/Source/*'
|