Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | public function present(ServerRequestInterface $request, PresentationModel $presentationModel): PresentationModel |
||
23 | { |
||
24 | if ($request->getAttribute('throw_logic_exception', 'n') === 'y') { |
||
25 | return $presentationModel->withVariables([ |
||
26 | 'throw_logic_exception' => true, |
||
27 | ]); |
||
28 | } elseif ($request->getAttribute('throw_runtime_exception', 'n') === 'y') { |
||
29 | throw new RuntimeException('item_exception'); |
||
30 | } |
||
31 | |||
32 | return $presentationModel; |
||
33 | } |
||
35 |