Total Complexity | 4 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
17 | final class RepositoryMock extends Repository |
||
18 | { |
||
19 | /** |
||
20 | * @throws \FlexPHP\Repositories\Exception\UndefinedGatewayRepositoryException |
||
21 | * |
||
22 | * @return int |
||
23 | */ |
||
24 | public function push(array $item) |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @throws \FlexPHP\Repositories\Exception\UndefinedGatewayRepositoryException |
||
31 | * |
||
32 | * @return null|array |
||
33 | */ |
||
34 | public function get(int $identifier) |
||
35 | { |
||
36 | return $this->getGateway()->read($identifier); |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @throws \FlexPHP\Repositories\Exception\UndefinedGatewayRepositoryException |
||
41 | * |
||
42 | * @return bool |
||
43 | */ |
||
44 | public function shift(int $identifier, array $item) |
||
45 | { |
||
46 | return $this->getGateway()->update($identifier, $item); |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * @throws \FlexPHP\Repositories\Exception\UndefinedGatewayRepositoryException |
||
51 | * |
||
52 | * @return bool |
||
53 | */ |
||
54 | public function pop(int $identifier) |
||
57 | } |
||
58 | } |
||
59 |