Closed phh closed 8 months ago
And I know I can just $rectorConfig->importNames();
but I would rather not include that rule at this point.
Try with this config:
$rectorConfig->importNames(importDocBlockNames: false);
$rectorConfig->importShortClasses(false);
It should works.
Example from EloquentMagicMethodToQueryBuilderRector prepends
query
to the Eloquent magic methods.Example:
After trying it:
Is there a way for the rule to leave the class at the current class name and only prepend the
query()
method?Ruleset is very simple: