@OndrejMirtes could Stan enforce a rule to prevent things like func_call($var, true) and require named argument: func_call($var, test_mode: true) for constant values?
@m1ke Absolutely! In fact I have a similar rule for phpstan-src development itself (including autofixer which does not need Rector 🤫) .
It requires named arguments instead of filling default values: doFoo(i: 1) instead of doFoo(null, null, null, 1).
https://github.com/phpstan/phpstan-src/blob/2.2.x/build/PHPStan/Build/NamedArgumentsRule.php
Please note the rule doesn’t do MethodCall for uninteresting reasons yet (but could do it in your codebase).
