Conditions | 3 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | public function check(&$value = null, $schema = null, ?JsonPointer $path = null, $i = null): void |
||
28 | { |
||
29 | $type = $schema->type ?? null; |
||
30 | $nullable = $schema->nullable ?? false; |
||
31 | |||
32 | if (is_array($type) === false) { |
||
33 | $type = [$type]; |
||
34 | } |
||
35 | |||
36 | if ($nullable === true) { |
||
37 | $type[] = 'null'; |
||
38 | |||
39 | $schema->type = $type; |
||
40 | } |
||
41 | |||
42 | parent::check($value, $schema, $path, $i); |
||
43 | } |
||
45 |