class AbstractMinMaxRule extends AbstractRule (View source)

Constants

VALIDATION_RULE_COMMENT_SENTENCE

SYMBOL_MAX_INCLUSIVE

Symbol to use for max rule

SYMBOL_MAX_EXCLUSIVE

Symbol to use for max exclusive rule

SYMBOL_MIN_INCLUSIVE

Symbol to use for min rule

SYMBOL_MIN_EXCLUSIVE

Symbol to use for min exclusive rule

SYMBOL_STRICT

Symbol to use for strict rule

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()

Name of the validation rule

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

Inline tests of the validation rule

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

Message when test fails in order to throw the exception

getRules()

No description

PhpMethod
getMethod()

No description

getMethods()

No description

getFile()

No description

getAttribute()

No description

getGenerator()

No description

string
symbol()

Must return the comparison symbol

string
comparisonString()

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

abstract string name()

Name of the validation rule

Return Value

string

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

Inline tests of the validation rule

Parameters

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

Return Value

string

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

Message when test fails in order to throw the exception

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

abstract string symbol()

Must return the comparison symbol

Return Value

string

final string comparisonString()

Return Value

string