| Total Complexity | 5 | 
| Total Lines | 23 | 
| Duplicated Lines | 0 % | 
| Coverage | 100% | 
| Changes | 2 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 11 | final class EntityWriter implements DataWriterInterface | ||
| 12 | { | ||
| 13 | 2 | public function __construct(private EntityManagerInterface $entityManager) | |
| 14 |     { | ||
| 15 | 2 | } | |
| 16 | |||
| 17 | /** | ||
| 18 | * @throws Throwable | ||
| 19 | */ | ||
| 20 | 1 | public function write(iterable $items): void | |
| 21 |     { | ||
| 22 | 1 |         foreach ($items as $entity) { | |
| 23 | 1 | $this->entityManager->persist($entity); | |
| 24 | } | ||
| 25 | 1 | $this->entityManager->run(); | |
| 26 | } | ||
| 27 | |||
| 28 | 1 | public function delete(iterable $items): void | |
| 34 | } | ||
| 35 | } | ||
| 36 |