Total Complexity | 5 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
7 | final class CachedCollection |
||
8 | { |
||
9 | private ?iterable $collection = null; |
||
10 | |||
11 | public function setCollection(iterable $collection): void |
||
12 | { |
||
13 | $this->collection = $collection; |
||
14 | } |
||
15 | |||
16 | public function isCollected(): bool |
||
17 | { |
||
18 | return $this->collection !== null; |
||
19 | } |
||
20 | |||
21 | /** |
||
22 | * @psalm-ignore-nullable-return |
||
23 | */ |
||
24 | public function getCollection(): ?iterable |
||
27 | } |
||
28 | |||
29 | public function getGenerator(): \Generator |
||
36 |