| Total Complexity | 5 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 20% |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | class ItemRepository extends ServiceEntityRepository |
||
| 18 | { |
||
| 19 | 4 | public function __construct(ManagerRegistry $registry) |
|
| 20 | { |
||
| 21 | 4 | parent::__construct($registry, Item::class); |
|
| 22 | } |
||
| 23 | |||
| 24 | /** @SuppressWarnings(PHPMD.BooleanArgumentFlag) */ |
||
| 25 | public function save(Item $entity, bool $flush = false): void |
||
| 26 | { |
||
| 27 | $this->getEntityManager()->persist($entity); |
||
| 28 | |||
| 29 | if ($flush) { |
||
| 30 | $this->getEntityManager()->flush(); |
||
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 34 | /** @SuppressWarnings(PHPMD.BooleanArgumentFlag) */ |
||
| 35 | public function remove(Item $entity, bool $flush = false): void |
||
| 41 | } |
||
| 42 | } |
||
| 43 | } |
||
| 44 |