| Total Complexity | 4 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | final class DatabaseBatchWriter |
||
| 11 | { |
||
| 12 | /** @var int */ |
||
| 13 | private int $batchSize; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param int $batchSize |
||
| 17 | */ |
||
| 18 | public function __construct(int $batchSize = 100) |
||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param array $items |
||
| 25 | * @param string $namespace |
||
| 26 | * @param callable $putItem Receives ($cacheKey, $cacheData, $namespace) |
||
| 27 | * @return void |
||
| 28 | */ |
||
| 29 | public function write(array $items, string $namespace, callable $putItem): void |
||
| 47 |