Issues (158)

src/Attribute/Field.php (1 issue)

Labels
Severity
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_PROPERTY|Attribute::TARGET_METHOD)]
13
final readonly class Field implements NamedAttribute, TypedAttribute
0 ignored issues
show
A parse error occurred: Syntax error, unexpected T_READONLY, expecting T_CLASS on line 13 at column 6
Loading history...
14
{
15
    /**
16
     * @param null|class-string|Type|ScalarType $type
17
     * @param null|class-string<DeferredTypeLoader> $deferredTypeLoader
18
     */
19 11
    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 11
    ) {}
26
27 8
    public function getName(): ?string
28
    {
29 8
        return $this->name;
30
    }
31
32 11
    public function getType(): null|ScalarType|string|Type
33
    {
34 11
        return $this->type;
35
    }
36
}
37