Conditions | 3 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function match(mixed $body): bool |
||
14 | { |
||
15 | if (!isset($this->structure['schema'])) { |
||
16 | if (!empty($body)) { |
||
17 | throw new NotMatchedException("Expected empty body for " . $this->name); |
||
18 | } |
||
19 | return true; |
||
20 | } |
||
21 | return $this->matchSchema($this->name, $this->structure['schema'], $body) ?? false; |
||
22 | } |
||
24 |