| Total Complexity | 6 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class DoctrineCartRepository implements CartRepository |
||
| 12 | { |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var EntityManager |
||
| 16 | */ |
||
| 17 | private $entityManger; |
||
| 18 | |||
| 19 | 9 | public function __construct(EntityManager $entityManger) |
|
| 20 | { |
||
| 21 | 9 | $this->entityManger = $entityManger; |
|
| 22 | 9 | } |
|
| 23 | |||
| 24 | 7 | public function add(Cart $cart): void |
|
| 27 | 7 | } |
|
| 28 | |||
| 29 | 9 | public function get(string $id): Cart |
|
| 36 | 7 | } |
|
| 37 | |||
| 38 | private function find(string $id): ?Cart |
||
| 50 | 3 | } |
|
| 51 | 2 | ||
| 52 | 2 | public function remove(string $id): void |
|
| 58 |