Something went wrong. Try again.
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637<?php
declare(strict_types=1);
namespace Wotnak\Atproto\Lexicon;
/** * One value or deferred violation in the iterative data-model walker. * * @internal */final readonly class DataModelValidationTask {
/** * @param array<string, true> $references */ private function __construct( public mixed $value, public int $path, public array $references, public ?string $message = NULL, public ?string $code = NULL, ) {}
/** * @param array<string, true> $references */ public static function value(mixed $value, int $path, array $references = []): self { return new self($value, $path, $references); }
public static function violation(int $path, string $message, string $code): self { return new self(NULL, $path, [], $message, $code); }
}