| Total Complexity | 3 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | #[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] |
||
| 8 | final class HydrationStrategy |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var string |
||
| 12 | */ |
||
| 13 | private string $strategy; |
||
| 14 | /** |
||
| 15 | * @var array |
||
| 16 | */ |
||
| 17 | private array $args; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param string $strategy |
||
| 21 | * @param mixed ...$args |
||
| 22 | */ |
||
| 23 | 7 | public function __construct(string $strategy, mixed ...$args) |
|
| 24 | { |
||
| 25 | 7 | $this->strategy = $strategy; |
|
| 26 | 7 | $this->args = $args; |
|
| 27 | 7 | } |
|
| 28 | |||
| 29 | /** |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | 6 | public function getStrategy(): string |
|
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return array |
||
| 39 | */ |
||
| 40 | 6 | public function getArgs(): array |
|
| 43 | } |
||
| 44 | } |
||
| 45 |