NoLegacyModelPropertiesRule
class NoLegacyModelPropertiesRule implements Rule
Recommend model configuration attributes over the properties they replace, which remain supported.
A declaration is reported only when removing it, or replacing it with the attribute, leaves the value the model initializes the setting to unchanged, given the model's current parents and attributes. No fix is offered: subclasses can rely on the declaration, and a nearer attribute replaces an inherited one entirely.
Constants
| private ATTRIBUTES |
The attributes the model reads for each setting. |
| private SETTERS |
The model methods that change each setting when the constructor calls them. |
| private TABLE_SETTINGS |
The setting each Table argument configures. |
| private LISTS |
The attribute listing each list setting's values, with its parameter. |
Methods
Get the node type the rule checks.
Report the model's configuration properties that attributes can replace or that can be removed.
Details
at line 125
__construct(LegacyPropertyHelper $helper)
Create a new no legacy model properties rule instance.
at line 133
string
getNodeType()
Get the node type the rule checks.
at line 143
array
processNode(Node $node, Scope $scope)
Report the model's configuration properties that attributes can replace or that can be removed.