llaville / php-compatinfo

Library that find out the minimum version and the extensions required for a piece of code to run
https://llaville.github.io/php-compatinfo/7.1/
Other
371 stars 21 forks source link

Method signature inheritance issue #294

Closed szepeviktor closed 3 years ago

szepeviktor commented 3 years ago

AbstractSniffAnalyser::beforeTraverse has {@inheritDoc} and ❗ it works 😃

PhpParser\NodeVisitor::beforeTraverse looks like

https://github.com/nikic/PHP-Parser/blob/master/lib/PhpParser/NodeVisitor.php#L7-L18

so we should return null|Node[] and phpstan tells us exactly that.

  62     Method Bartlett\CompatInfo\Application\Analyser\AbstractSniffAnalyser::beforeTraverse() should return
         array<PhpParser\Node>|null but return statement is missing.

Adding a return statement will resolve this and all other problems of this kind.

llaville commented 3 years ago

Thanks for PR !

llaville commented 3 years ago

on my way to adds return null missing !

szepeviktor commented 3 years ago

🗯️🗯️🗯️

🚂🚂🚂