class StringRule extends AbstractRule (View source)

Constants

VALIDATION_RULE_COMMENT_SENTENCE

Properties

protected Rules $rules from AbstractRule

Methods

__construct(Rules $rules)

No description

applyRule(string $parameterName, string|string[] $value, bool $itemType = false)

This method has to add the validation rule to the method's body

string
validationRuleComment(string|string[] $value)

No description

string
name()

No description

string
testConditions(string $parameterName, string|string[] $value, bool $itemType = false)

No description

string
exceptionMessageOnTestFailure(string $parameterName, string|string[] $value, bool $itemType = false)

No description

getRules()

No description

PhpMethod
getMethod()

No description

getMethods()

No description

getFile()

No description

getAttribute()

No description

getGenerator()

No description

Details

__construct(Rules $rules)

Parameters

Rules $rules

final AbstractRule applyRule(string $parameterName, string|string[] $value, bool $itemType = false)

This method has to add the validation rule to the method's body

Parameters

string $parameterName
string|string[] $value
bool $itemType

Return Value

AbstractRule

final string validationRuleComment(string|string[] $value)

Parameters

string|string[] $value

Return Value

string

string name()

Return Value

string

string testConditions(string $parameterName, string|string[] $value, bool $itemType = false)

Parameters

string $parameterName
string|string[] $value
bool $itemType

Return Value

string

string exceptionMessageOnTestFailure(string $parameterName, string|string[] $value, bool $itemType = false)

Parameters

string $parameterName
string|string[] $value
bool $itemType

Return Value

string

Rules getRules()

Return Value

Rules

PhpMethod getMethod()

Return Value

PhpMethod

Method getMethods()

Return Value

Method

StructAttribute getAttribute()

Return Value

StructAttribute

Generator getGenerator()

Return Value

Generator