API reference / Quittio \ Core \ Validation \ Rules
RuleReporter
final class in quittio/core
Quittio\Core\Validation\Rules\RuleReporter · Source
Collects the findings of one rule.
Methods#
| Method | Description |
|---|---|
->__construct() | |
->context() | |
->error() | |
->info() | |
->messages() | |
->warning() |
__construct()#
public function __construct(
string $code,
ValidationLevel $level,
ValidationContext $context,
string $namespace,
string $fallback,
)| Parameter | Type | Description |
|---|---|---|
$code | string | |
$level | ValidationLevel | |
$context | ValidationContext | |
$namespace | string | |
$fallback | string |
context()#
public function context(): ValidationContext- Returns
ValidationContext
error()#
public function error(
?string $bt = null,
?string $path = null,
array<string, string|int> $replace = [],
): void| Parameter | Type | Description |
|---|---|---|
$bt | ?string = null | |
$path | ?string = null | |
$replace | array<string, string|int> = [] |
info()#
public function info(
?string $bt = null,
?string $path = null,
array<string, string|int> $replace = [],
): void| Parameter | Type | Description |
|---|---|---|
$bt | ?string = null | |
$path | ?string = null | |
$replace | array<string, string|int> = [] |
messages()#
public function messages(): list<ValidationMessage>- Returns
list<ValidationMessage>
warning()#
public function warning(
?string $bt = null,
?string $path = null,
array<string, string|int> $replace = [],
): void| Parameter | Type | Description |
|---|---|---|
$bt | ?string = null | |
$path | ?string = null | |
$replace | array<string, string|int> = [] |