Reported automatically by a code-commandments agent.
|
|
| Prophet |
ExplicitDataFactory |
| Location |
src/Workflow/Nodes/UnpackRegistry.php:256 |
What's wrong
False positive: EloquentModelUnpacker::from(Model): array is a custom domain Unpacker method (returns an array, NOT a Spatie Data class), so there is no magic object dispatch to make explicit. The prophet flags any ::from($object) call, but Unpacker::from is an unrelated contract method. Same for line 251 ($unpackerClass::from($instance)).
Flagged code
return Option::some(EloquentModelUnpacker::from($instance));
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.
ExplicitDataFactorysrc/Workflow/Nodes/UnpackRegistry.php:256What's wrong
False positive: EloquentModelUnpacker::from(Model): array is a custom domain Unpacker method (returns an array, NOT a Spatie Data class), so there is no magic object dispatch to make explicit. The prophet flags any ::from($object) call, but Unpacker::from is an unrelated contract method. Same for line 251 ($unpackerClass::from($instance)).
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.