class NoPipeSeparatedValidationRulesAttributeRule implements Rule

Recommend arrays over pipe-separated rule strings in Data's #[Rule] attribute.

Methods

__construct(ReflectionProvider $reflectionProvider, ValidationRuleHelper $helper)

Create a new rule instance.

string
getNodeType()

Get the node type the rule checks.

array
processNode(Node $node, Scope $scope)

Report the pipe-separated rule strings the attribute takes.

Details

at line 28
__construct(ReflectionProvider $reflectionProvider, ValidationRuleHelper $helper)

Create a new rule instance.

Parameters

ReflectionProvider $reflectionProvider
ValidationRuleHelper $helper

at line 37
string getNodeType()

Get the node type the rule checks.

Return Value

string

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

Report the pipe-separated rule strings the attribute takes.

Parameters

Node $node
Scope $scope

Return Value

array