Total Complexity | 4 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class ValidationContext implements ValidationContextInterface |
||
10 | { |
||
11 | /** |
||
12 | * @var SchemaInterface |
||
13 | */ |
||
14 | protected $schema; |
||
15 | |||
16 | /** |
||
17 | * @var SchemaValidationException[] |
||
18 | */ |
||
19 | protected $errors = []; |
||
20 | |||
21 | /** |
||
22 | * SchemaValidationContext constructor. |
||
23 | * @param SchemaInterface $schema |
||
24 | */ |
||
25 | public function __construct(SchemaInterface $schema) |
||
26 | { |
||
27 | $this->schema = $schema; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * @inheritdoc |
||
32 | */ |
||
33 | public function reportError(ValidationExceptionInterface $error) |
||
34 | { |
||
35 | $this->errors[] = $error; |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * @inheritdoc |
||
40 | */ |
||
41 | public function getErrors(): array |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * @inheritdoc |
||
48 | */ |
||
49 | public function getSchema(): SchemaInterface |
||
54 |