Reported automatically by a code-commandments agent.
|
|
| Prophet |
PreferTypeMethodOverInlineDispatch |
| Location |
src/Pipeline/Execution/WireCategory.php:32 |
What's wrong
False positive: this match($this) IS the type-method the rule asks for — token() already lives ON WireCategory and dispatches on its own cases. The rule's prescribed fix ('give self a method, call $this->method()') is literally this code; a per-case enum method's body must be a match($this). There is no outer type to move behaviour onto.
Flagged code
For the fixer
Decide whether this is a false positive (tighten/guard the prophet), a wrong rule (adjust the rule or its config), or correct-but-unclear (improve the message/scripture). Add a fixture from the flagged code above.
Reported automatically by a code-commandments agent.
PreferTypeMethodOverInlineDispatchsrc/Pipeline/Execution/WireCategory.php:32What's wrong
False positive: this match($this) IS the type-method the rule asks for — token() already lives ON WireCategory and dispatches on its own cases. The rule's prescribed fix ('give self a method, call $this->method()') is literally this code; a per-case enum method's body must be a match($this). There is no outer type to move behaviour onto.
Flagged code
For the fixer
Decide whether this is a false positive (tighten/guard the prophet), a wrong rule (adjust the rule or its config), or correct-but-unclear (improve the message/scripture). Add a fixture from the flagged code above.