class NoModelMakeRule implements Rule

Catches inefficient instantiation of models using Model::make().

For example: User::make()

It is functionally equivalent to simply use the constructor: new User()

Properties

protected ReflectionProvider $reflectionProvider

Methods

__construct(ReflectionProvider $reflectionProvider)

No description

string
getNodeType()

No description

array
processNode(Node $node, Scope $scope)

No description

bool
isCalledOnModel(StaticCall $call, Scope $scope)

Was the expression called on a Model instance?

Details

at line 43
__construct(ReflectionProvider $reflectionProvider)

No description

Parameters

ReflectionProvider $reflectionProvider

at line 51
string getNodeType()

No description

Return Value

string

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

No description

Parameters

Node $node
Scope $scope

Return Value

array

at line 93
protected bool isCalledOnModel(StaticCall $call, Scope $scope)

Was the expression called on a Model instance?

Parameters

StaticCall $call
Scope $scope

Return Value

bool