NoLegacyModelScopesRule
class NoLegacyModelScopesRule implements Rule
Recommend protected #[Scope] methods over legacy scopeX() methods, which remain supported.
No fix is offered, because renaming the method breaks direct calls in other files.
Methods
string
getNodeType()
Get the node type the rule checks.
array
processNode(Node $node, Scope $scope)
Report legacy scope methods that the model can declare as attributed scopes.
Details
at line 32
__construct(ModelRuleHelper $modelRuleHelper)
Create a new no legacy model scopes rule instance.
at line 40
string
getNodeType()
Get the node type the rule checks.
at line 50
array
processNode(Node $node, Scope $scope)
Report legacy scope methods that the model can declare as attributed scopes.