Conditions | 4 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | 6 | public function validate(RequestInterface $input): void |
|
23 | { |
||
24 | try { |
||
25 | 6 | $this->adapted->validate($input); |
|
26 | 5 | } catch (NoOperation|NoPath|MultipleOperationsMismatchForRequest $e) { |
|
27 | 3 | throw new OperationNotFoundException($input, $e); |
|
28 | 2 | } catch (\Throwable $e) { |
|
29 | 2 | $error = $this->mapper->map($e); |
|
30 | 2 | if ($error !== null) { |
|
31 | 1 | throw $error; |
|
32 | } |
||
33 | 1 | throw $e; |
|
34 | } |
||
37 |