diff --git a/phpstan.neon b/phpstan.neon index 7e48d4ba82..a3e021d9e0 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -30,8 +30,6 @@ parameters: - packages/easy-coding-standard/tests/Finder/SourceFinderSource/Source/SomeClass.php ignoreErrors: - - '#Cannot assign offset int to int#' - # command argument value type conversion - known string - message: '#Cannot cast array\|string\|null to string#' @@ -43,11 +41,9 @@ parameters: # invalid 3rd party-code - '#Parameter \#1 \$index of method PhpCsFixer\\Tokenizer\\Tokens::getNextTokenOfKind\(\) expects int, int\\|null given#' - '#Variable \$processedFileContent might not be defined#' - - '#Property Symplify\\CodingStandard\\TokenRunner\\Wrapper\\FixerWrapper\\FixerClassWrapper::\$startBracketIndex \(int\) does not accept int\|null#' # known values - '#Parameter \#2 \$start of method PHP_CodeSniffer\\Files\\File::findNext\(\) expects int, (.*?) given#' - - '#Parameter \#3 \$end of method PHP_CodeSniffer\\Files\\File::findNext\(\) expects int\|null, int\|true given#' # required for autowiring, since only interface is autowired - '#Call to an undefined method Symfony\\Component\\DependencyInjection\\ContainerInterface::getParameterBag()#' @@ -64,8 +60,6 @@ parameters: - '#Cannot call method attach\(\) on array>\|SplObjectStorage#' - '#Parameter \#1 \$path of function dirname expects string, string\|false given#' - '#Method Symplify\\PackageBuilder\\Console\\Command\\CommandNaming::getShortClassName\(\) should return string but returns string\|null#' - - '#Cannot access offset (.*?) on Symplify\\Statie\\Generator\\Renderable\\File\\AbstractGeneratorFile#' - - '#Parameter \#1 \$stack of function array_pop expects array, array\|false given#' - '#Cannot call method getStart\(\) on Symplify\\CodingStandard\\TokenRunner\\ValueObject\\BlockInfo\|null#' - '#Method Symplify\\CodingStandard\\TokenRunner\\Analyzer\\SnifferAnalyzer\\CognitiveComplexityAnalyzer::getMeasuredNestingLevel\(\) should return int but returns float\|int#' @@ -99,20 +93,13 @@ parameters: # false positive - '#Cannot assign offset \(int\|string\) to PhpCsFixer\\Tokenizer\\Tokens#' - '#Parameter \#1 \$subject of static method Nette\\Utils\\Strings\:\:match\(\) expects string, string\|false given#' - - '#Parameter \#1 \$tokens of method Symplify\\CodingStandard\\Fixer\\Naming\\CatchExceptionNameMatchingTypeFixer\:\:updateCatchBodyVariableName\(\) expects PhpCsFixer\\Tokenizer\\Tokens, array given#' # yield iterator - - '#Return type \(Iterator\) of method Symplify\\Statie\\Twig\\(.*?)\:\:(.*?)\(\) should be compatible with return type \(array\) of method Twig\\Extension\\(.*?)\(\)#' - - '#PHPDoc tag @return with type array is incompatible with native type Iterator#' - - '#PHPDoc tag @return with type array is incompatible with native type Iterator#' - - '#Parameter \#1 \$filename of function filesize expects string, string\|false given#' - '#Method Symplify\\SetConfigResolver\\Finder\\SetFileFinder\:\:detectFromInputAndDirectory\(\) should return string\|null but return statement is missing#' - '#Parameter \#1 \$unversionedSets of method Symplify\\SetConfigResolver\\SetResolver\:\:createSetListInString\(\) expects array, array\|string\> given#' - '#Parameter \#2 \$versionedSets of method Symplify\\SetConfigResolver\\SetResolver\:\:createSetListInString\(\) expects array\>, array\|string\> given#' - - '#Parameter \#1 \$files of method Symplify\\SmartFileSystem\\Finder\\FinderSanitizer\:\:sanitize\(\) expects \(iterable&Nette\\Utils\\Finder\)\|Symfony\\Component\\Finder\\Finder, array given#' - '#Parameter \#1 \$files of method Symplify\\SmartFileSystem\\Finder\\FinderSanitizer\:\:sanitize\(\) expects \(iterable&Nette\\Utils\\Finder\)\|Symfony\\Component\\Finder\\Finder, array given#' - - '#Parameter \#2 \$filesToImport of method Symplify\\Statie\\Migrator\\Worker\\StatieImportsAdder\:\:addImportSection\(\) expects array, array\|string\> given#' - '#Cannot access offset int on int#' - '#Call to an undefined method ReflectionType\:\:getName\(\)#' - '#Parameter \#1 \$argument of class ReflectionClass constructor expects class\-string\|T of object, string given#'