| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function execute($request) |
||
| 25 | { |
||
| 26 | $this->throwExceptionIfRequestNotValid(__FUNCTION__, RequestMock::class, $request); |
||
| 27 | |||
| 28 | $item = []; |
||
| 29 | $item['foo'] = $request->foo; |
||
| 30 | $item['bar'] = $request->bar; |
||
| 31 | |||
| 32 | try { |
||
| 33 | $response = $this->getRepository()->push($item); |
||
| 34 | } catch (Exception $exception) { |
||
| 35 | throw new UnavailableRepositoryUseCaseException($exception->getMessage()); |
||
| 36 | } |
||
| 37 | |||
| 38 | return new ResponseMock($response); |
||
| 39 | } |
||
| 41 |