jerowork /
graphql-attribute-schema
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace Jerowork\GraphqlAttributeSchema\Attribute; |
||
| 6 | |||
| 7 | use Attribute; |
||
| 8 | use Jerowork\GraphqlAttributeSchema\Attribute\Option\ScalarType; |
||
| 9 | use Jerowork\GraphqlAttributeSchema\Attribute\Option\Type; |
||
| 10 | |||
| 11 | #[Attribute(Attribute::TARGET_PARAMETER)] |
||
| 12 | final readonly class Arg implements NamedAttribute, TypedAttribute |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @param null|class-string|Type|ScalarType $type |
||
| 16 | */ |
||
| 17 | 4 | public function __construct( |
|
| 18 | public ?string $name = null, |
||
| 19 | public ?string $description = null, |
||
| 20 | public null|ScalarType|string|Type $type = null, |
||
| 21 | 4 | ) {} |
|
| 22 | |||
| 23 | public function getName(): ?string |
||
| 24 | { |
||
| 25 | return $this->name; |
||
| 26 | } |
||
| 27 | |||
| 28 | 4 | public function getType(): null|ScalarType|string|Type |
|
| 29 | { |
||
| 30 | 4 | return $this->type; |
|
| 31 | } |
||
| 32 | } |
||
| 33 |