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

__construct(ModelRuleHelper $modelRuleHelper)

Create a new no legacy model scopes rule instance.

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.

Parameters

ModelRuleHelper $modelRuleHelper

at line 40
string getNodeType()

Get the node type the rule checks.

Return Value

string

at line 50
array processNode(Node $node, Scope $scope)

Report legacy scope methods that the model can declare as attributed scopes.

Parameters

Node $node
Scope $scope

Return Value

array