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