Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| NamedTypeMetadata | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| describe | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Celema\Quma\Hydration; |
| 6 | |
| 7 | use BackedEnum; |
| 8 | |
| 9 | /** @internal */ |
| 10 | final readonly class NamedTypeMetadata |
| 11 | { |
| 12 | /** |
| 13 | * @param non-empty-string $name The scalar type or the class name |
| 14 | * @param 'int'|'float'|'bool'|'string'|null $scalar |
| 15 | * @param 'immutable'|'mutable'|null $date |
| 16 | * @param class-string<BackedEnum>|null $enum |
| 17 | */ |
| 18 | public function __construct( |
| 19 | public string $name, |
| 20 | public ?string $scalar, |
| 21 | public ?string $date, |
| 22 | public ?string $enum, |
| 23 | ) {} |
| 24 | |
| 25 | public function describe(): string |
| 26 | { |
| 27 | return $this->name; |
| 28 | } |
| 29 | } |