Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
18 | 12 | public function __construct(iterable $items, EntityManagerInterface $em, int $chunkSize = 100) |
|
19 | { |
||
20 | 12 | if (!\is_countable($items)) { |
|
21 | 1 | throw new \InvalidArgumentException('$items must be countable.'); |
|
22 | } |
||
23 | |||
24 | 11 | $this->batchProcessor = new ORMBatchProcessor($items, $em, $chunkSize); |
|
25 | 11 | $this->countable = &$items; |
|
26 | 11 | } |
|
38 |