class ModelPropertyColumnRule implements Rule

Check the column arguments of the pagination methods and pluck(), and the columns a dynamic where names, against the model's properties.

The other query methods take model-property parameters from the stubs. The pagination methods and pluck() cannot be stubbed: their returns name the collections and paginators, whose declarations fail stub validation. A dynamic where has no declaration at all.

Constants

private METHODS

The column parameter of each checked method, and the classes whose implementation of it is checked.

Methods

__construct(BuilderHelper $builderHelper, ModelPropertyHelper $modelPropertyHelper, ModelRuleHelper $modelRuleHelper, RuleLevelHelper $ruleLevelHelper)

Create the rule.

string
getNodeType()

Get the node type the rule checks.

array
processNode(Node $node, Scope $scope)

Report a column that is not a property of the queried model.

Details

at line 76
__construct(BuilderHelper $builderHelper, ModelPropertyHelper $modelPropertyHelper, ModelRuleHelper $modelRuleHelper, RuleLevelHelper $ruleLevelHelper)

Create the rule.

Parameters

BuilderHelper $builderHelper
ModelPropertyHelper $modelPropertyHelper
ModelRuleHelper $modelRuleHelper
RuleLevelHelper $ruleLevelHelper

at line 87
string getNodeType()

Get the node type the rule checks.

Return Value

string

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

Report a column that is not a property of the queried model.

Parameters

Node $node
Scope $scope

Return Value

array