Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| CmsSingleInput | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\Core\Attributes; |
| 3 | |
| 4 | use Apie\Core\Dto\CmsInputOption; |
| 5 | use Apie\Core\Lists\StringList; |
| 6 | use Attribute; |
| 7 | |
| 8 | #[Attribute(Attribute::TARGET_CLASS|Attribute::TARGET_METHOD|Attribute::TARGET_PROPERTY|Attribute::TARGET_PARAMETER)] |
| 9 | final class CmsSingleInput |
| 10 | { |
| 11 | public readonly StringList $types; |
| 12 | |
| 13 | /** |
| 14 | * @param array<int, string> $types |
| 15 | */ |
| 16 | public function __construct(array $types, public readonly CmsInputOption $options = new CmsInputOption()) |
| 17 | { |
| 18 | $this->types = new StringList($types); |
| 19 | } |
| 20 | } |