| Total Complexity | 6 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Coverage | 75% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | trait HasResolver |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * The field's value setter & getter |
||
| 12 | */ |
||
| 13 | protected Resolver $resolver; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Initialise trait in Flexible constructor. |
||
| 17 | */ |
||
| 18 | 15 | protected function initializeHasResolver(): void |
|
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Set the field's resolver. |
||
| 25 | * |
||
| 26 | * @param Resolver|class-string<Resolver> $resolver |
||
|
|
|||
| 27 | * @return static |
||
| 28 | */ |
||
| 29 | 15 | public function setResolver(Resolver|string $resolver): static |
|
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @deprecated |
||
| 47 | */ |
||
| 48 | public function resolver(Resolver|string $resolver): static |
||
| 53 |