Remove useless named arguments #7373
Closed
lowwa132
started this conversation in
Feature ideas
Replies: 1 comment 1 reply
-
Hi @lowwa132 🙂. I believe Fixer is not a good place for that because we run analysis without full SCA context. We just tokenise the code and run rules against tokens. When analysing function call, we don't have any information about its signature (unless it's defined in the same file), so we can't determine if named arguments are superfluous or not. I believe tools like PHPStan or Psalm fit this case better 🙂. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As stated in this comment #6627 (comment) named parameters used in a bad way impact readability, for example:
Is it possible to consider having a detection of such cases, and remove useless named arguments when it corresponds to function's signature ?
Beta Was this translation helpful? Give feedback.
All reactions