| Total Complexity | 4 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | final class ORMCountableBatchProcessor implements \IteratorAggregate, \Countable |
||
| 11 | { |
||
| 12 | private ORMBatchProcessor $batchProcessor; |
||
| 13 | private iterable $countable; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param iterable $items Must be countable |
||
| 17 | */ |
||
| 18 | 12 | public function __construct(iterable $items, EntityManagerInterface $em, int $chunkSize = 100) |
|
| 26 | 11 | } |
|
| 27 | |||
| 28 | 11 | public function getIterator(): \Traversable |
|
| 29 | { |
||
| 30 | 11 | yield from $this->batchProcessor; |
|
| 31 | 11 | } |
|
| 32 | |||
| 33 | 11 | public function count(): int |
|
| 36 | } |
||
| 37 | } |
||
| 38 |