rectorphp / rector-phpunit

Rector upgrade rules for PHPUnit
http://getrector.com
MIT License
62 stars 47 forks source link

Fix phpstan notice on update to phpstan 1.10.11 #166

Closed samsonasik closed 1 year ago

samsonasik commented 1 year ago

After update to phpstan 1.10.11, there is notice:

➜  rector-phpunit git:(main) composer phpstan
> vendor/bin/phpstan analyse --ansi --error-format symplify
Note: Using configuration file /Users/samsonasik/www/rector-phpunit/phpstan.neon.
 198/198 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  src/NodeFinder/DataProviderClassMethodFinder.php:124
 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  - '#Method Rector\\PHPUnit\\NodeFinder\\DataProviderClassMethodFinder\:\:resolveParentAbstractClasses\(\) should return array<PhpParser\\Node\\Stmt\\Class_> but returns array<int<0, max>, PhpParser\\Node\\Stmt\\Class_\|PhpParser\\Node\\Stmt\\Enum_\|PhpParser\\Node\\Stmt\\Interface_\|PhpParser\\Node\\Stmt\\Trait_\|null>#'
 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 [ERROR] Found 1 errors                                                                                                 

Script vendor/bin/phpstan analyse --ansi --error-format symplify handling the phpstan event returned with error code 1

This PR resolve it. Ref https://github.com/rectorphp/rector-src/pull/3562#issuecomment-1496713887