NoModelMakeRule
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
at line 51
string
getNodeType()
No description
at line 61
array
processNode(Node $node, Scope $scope)
No description
at line 93
protected bool
isCalledOnModel(StaticCall $call, Scope $scope)
Was the expression called on a Model instance?