@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).

phpstan-src/build/PHPStan/Build/NamedArgumentsRule.php at 2.2.x · phpstan/phpstan-src

PHPStan's source code. This is where development happens. Check https://github.com/phpstan/phpstan for the distribution repository. - phpstan/phpstan-src

GitHub
@m1ke If you have your laptop with you, catch me in the afternoon and we can code it together.
@OndrejMirtes I do, will try and catch you after my talk