| Total Complexity | 3 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | trait Caching |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var ?bool |
||
| 23 | */ |
||
| 24 | private $cache; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var ?int |
||
| 28 | */ |
||
| 29 | private $cost; |
||
| 30 | |||
| 31 | public function cache(bool $cache, ?int $cost = null): self |
||
| 32 | { |
||
| 33 | $self = clone $this; |
||
| 34 | $self->cache = $cache; |
||
| 35 | $self->cost = $cost; |
||
| 36 | |||
| 37 | return $self; |
||
| 38 | } |
||
| 39 | |||
| 40 | private function getCacheFields(): array |
||
| 45 | ]; |
||
| 46 | } |
||
| 48 |