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 | use Jerowork\GraphqlAttributeSchema\Type\Loader\DeferredTypeLoader; |
||
11 | |||
12 | #[Attribute(Attribute::TARGET_METHOD)] |
||
13 | final readonly class Mutation implements NamedAttribute, TypedAttribute |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
14 | { |
||
15 | /** |
||
16 | * @param null|class-string|Type|ScalarType $type |
||
17 | * @param null|class-string<DeferredTypeLoader> $deferredTypeLoader |
||
18 | */ |
||
19 | 19 | public function __construct( |
|
20 | public ?string $name = null, |
||
21 | public ?string $description = null, |
||
22 | public null|ScalarType|string|Type $type = null, |
||
23 | public ?string $deprecationReason = null, |
||
24 | public ?string $deferredTypeLoader = null, |
||
25 | 19 | ) {} |
|
26 | |||
27 | 4 | public function getName(): ?string |
|
28 | { |
||
29 | 4 | return $this->name; |
|
30 | } |
||
31 | |||
32 | 18 | public function getType(): null|ScalarType|string|Type |
|
33 | { |
||
34 | 18 | return $this->type; |
|
35 | } |
||
36 | } |
||
37 |