| Total Complexity | 3 | 
| Total Lines | 34 | 
| Duplicated Lines | 0 % | 
| Coverage | 100% | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 16 | #[Attribute(Attribute::TARGET_METHOD)] | ||
| 17 | final class Field implements ApiAttribute | ||
| 18 | { | ||
| 19 | /** | ||
| 20 | * @var Argument[] | ||
| 21 | */ | ||
| 22 | public array $args = []; | ||
| 23 | |||
| 24 | public null|string|Type $type = null; | ||
| 25 | |||
| 26 | /** | ||
| 27 | * @param null|string $name Can be used to alias the field | ||
| 28 | * @param null|string $type FQCN of PHP class implementing the GraphQL type, see README.md#type-syntax | ||
| 29 | */ | ||
| 30 | 17 | public function __construct( | |
| 31 | public ?string $name = null, | ||
| 32 | ?string $type = null, | ||
| 33 | public ?string $description = null, | ||
| 34 |     ) { | ||
| 35 | 17 | $this->type = $type; | |
| 36 | } | ||
| 37 | |||
| 38 | 11 | public function toArray(): array | |
| 50 | 11 | ]; | |
| 51 | } | ||
| 53 |