Skip to content

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#

MethodDescription
->__construct()
->context()
->error()
->info()
->messages()
->warning()

__construct()#

public function __construct(
    string $code,
    ValidationLevel $level,
    ValidationContext $context,
    string $namespace,
    string $fallback,
)
ParameterTypeDescription
$codestring
$levelValidationLevel
$contextValidationContext
$namespacestring
$fallbackstring

context()#

public function context(): ValidationContext
Returns
ValidationContext

error()#

public function error(
    ?string $bt = null,
    ?string $path = null,
    array<string, string|int> $replace = [],
): void
ParameterTypeDescription
$bt?string = null
$path?string = null
$replacearray<string, string|int> = []

info()#

public function info(
    ?string $bt = null,
    ?string $path = null,
    array<string, string|int> $replace = [],
): void
ParameterTypeDescription
$bt?string = null
$path?string = null
$replacearray<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
ParameterTypeDescription
$bt?string = null
$path?string = null
$replacearray<string, string|int> = []

The open core packages are MIT licensed. The legal wording of the country packs must be confirmed by a tax adviser.