class NoImplicitQueryBuilderCallRule implements MultipleNodeTypesRule

Report calls a model forwards to its query builder, which an explicit query() or newQuery() call makes clear.

Constants

private FORWARDING_METHODS

The model methods that forward an instance call to newQuery().

private STATIC_FORWARDING_METHODS

The model methods that forward a static call to a new instance's newQuery(), which query() also runs.

Methods

__construct(ForwardedModelMethodExtension $forwardedModelMethodExtension, NamedScopeMethodExtension $namedScopeMethodExtension, ModelRuleHelper $modelRuleHelper)

Create a new implicit query builder call rule instance.

array
getNodeTypes()

Get the node types the rule checks.

string
getNodeType()

Get the node type the rule checks.

array
processNode(Node $node, Scope $scope)

Report a model call that is forwarded to the query builder.

Details

at line 51
__construct(ForwardedModelMethodExtension $forwardedModelMethodExtension, NamedScopeMethodExtension $namedScopeMethodExtension, ModelRuleHelper $modelRuleHelper)

Create a new implicit query builder call rule instance.

Parameters

ForwardedModelMethodExtension $forwardedModelMethodExtension
NamedScopeMethodExtension $namedScopeMethodExtension
ModelRuleHelper $modelRuleHelper

at line 61
array getNodeTypes()

Get the node types the rule checks.

Return Value

array

at line 69
string getNodeType()

Get the node type the rule checks.

Return Value

string

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

Report a model call that is forwarded to the query builder.

Parameters

Node $node
Scope $scope

Return Value

array