Lines
0.00%
0 / 1
Functions and Methods
0.00%
0 / 1
Classes and Traits
0.00%
0 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ClassShape | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | 0.00% | 0 / 1 | |||
| __construct | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace Stewart\Runtime\Json; | |
| 6 | ||
| 7 | final readonly class ClassShape | |
| 8 | { | |
| 9 | public bool $holdsFragment; | |
| 10 | ||
| 11 | /** | |
| 12 | * @param class-string $class | |
| 13 | * @param list<FieldShape> $fields | |
| 14 | */ | |
| 15 | public function __construct( | |
| 16 | public string $class, | |
| 17 | public array $fields, | |
| 18 | ) { | |
| 19 | $this->holdsFragment = array_any($fields, static fn(FieldShape $field): bool => $field->value->kind === ValueKind::Fragment); | |
| 20 | } | |
| 21 | } |