ObserverAttributeRule
class ObserverAttributeRule implements Rule
| internal |
Reports a service provider registering a model's observers with observe(), where the Laravel convention is #[ObservedBy] on the model.
Only an unconditional statement in register() or boot() with a constant list of observer classes counts, for a model the application declares rather than an installed package.
Methods
__construct(ReflectionProvider $reflectionProvider, RuntimeInputs $runtimeInputs)
Create a new observer attribute rule instance.
string
getNodeType()
Get the node type the rule checks.
array
processNode(Node $node, Scope $scope)
Report the provider method's observe() registrations.
Details
at line 57
__construct(ReflectionProvider $reflectionProvider, RuntimeInputs $runtimeInputs)
Create a new observer attribute rule instance.
at line 66
string
getNodeType()
Get the node type the rule checks.
at line 79
array
processNode(Node $node, Scope $scope)
Report the provider method's observe() registrations.