You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this dynamic property fetches lead to badly static analysable code
as soon as a class contains a single dynamic property lookup, phpstan is no longer able to tell you whether one of the declared properties is unused (analog for methods).
what do you think about adding a new Node->getSubNodes() method, so the dynamic property lookup is only available in one place insider php-parser and caller code would be more static analysis friendly?
The text was updated successfully, but these errors were encountered:
the current
Node->getSubNodeNames()
api leads to consuming code with dynamic property fetches like:In PHPStan-src alone this pattern repeats 8 times.
Its also visibile in the php-parser codebase 2 times:
PHP-Parser/lib/PhpParser/PrettyPrinterAbstract.php
Lines 643 to 651 in 3abf742
PHP-Parser/lib/PhpParser/NodeTraverser.php
Lines 93 to 98 in 3abf742
this dynamic property fetches lead to badly static analysable code
what do you think about adding a new
Node->getSubNodes()
method, so the dynamic property lookup is only available in one place insider php-parser and caller code would be more static analysis friendly?The text was updated successfully, but these errors were encountered: