| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 2 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function __construct(Closure $createCompactor) |
||
| 28 | { |
||
| 29 | $this->createCompactor = $createCompactor; |
||
| 30 | |||
| 31 | // Instantiate a compactor instead of lazily instantiate it in order to ensure the factory closure is correct |
||
| 32 | // and that the created object is of the created type. Since compactors instantiation should be fast, this is |
||
| 33 | // a minimal overhead which is an acceptable trade-off for providing early errors. |
||
| 34 | $this->getCompactor(); |
||
| 35 | } |
||
| 70 |