| Total Complexity | 5 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class DoctrineCartRepository implements CartRepository |
||
| 13 | { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var EntityManager |
||
| 17 | */ |
||
| 18 | private $entityManger; |
||
| 19 | |||
| 20 | 9 | public function __construct(EntityManager $entityManger) |
|
| 21 | { |
||
| 22 | 9 | $this->entityManger = $entityManger; |
|
| 23 | 9 | } |
|
| 24 | |||
| 25 | 7 | public function add(Cart $cart): void |
|
| 26 | { |
||
| 27 | 7 | $this->entityManger->persist($cart); |
|
| 28 | 7 | } |
|
| 29 | |||
| 30 | 9 | public function get(string $id): Cart |
|
| 46 | } |
||
| 47 | } |
||
| 48 | |||
| 49 | 3 | public function remove(string $id): void |
|
| 55 |