| Total Complexity | 4 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class RepositoryMock extends Repository |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @param array $item |
||
| 16 | * @return int |
||
| 17 | * @throws \FlexPHP\Repositories\Exception\UndefinedGatewayRepositoryException |
||
| 18 | */ |
||
| 19 | public function push(array $item) |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param int $id |
||
| 26 | * @return array|null |
||
| 27 | * @throws \FlexPHP\Repositories\Exception\UndefinedGatewayRepositoryException |
||
| 28 | */ |
||
| 29 | public function get(int $id) |
||
| 30 | { |
||
| 31 | return $this->getGateway()->read($id); |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param int $id |
||
| 36 | * @param array $item |
||
| 37 | * @return bool |
||
| 38 | * @throws \FlexPHP\Repositories\Exception\UndefinedGatewayRepositoryException |
||
| 39 | */ |
||
| 40 | public function shift(int $id, array $item) |
||
| 41 | { |
||
| 42 | return $this->getGateway()->update($id, $item); |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param int $id |
||
| 47 | * @return bool |
||
| 48 | * @throws \FlexPHP\Repositories\Exception\UndefinedGatewayRepositoryException |
||
| 49 | */ |
||
| 50 | public function pop(int $id) |
||
| 53 | } |
||
| 54 | } |
||
| 55 |