Passed
Pull Request — main (#102)
by Tom
04:31 queued 01:34
created

Field::getType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ApiSkeletons\Doctrine\GraphQL\Attribute;
6
7
use Attribute;
8
9
#[Attribute(Attribute::TARGET_PROPERTY | Attribute::IS_REPEATABLE)]
10
class Field
11
{
12
    /** @param string[] $excludeCriteria */
13
    public function __construct(
14
        protected string $group = 'default',
15
        protected string|null $strategy = null,
16
        protected string|null $description = null,
17
        protected string|null $type = null,
18
        private array $excludeCriteria = [],
19
    ) {
20
    }
21
22
    public function getGroup(): string
23
    {
24
        return $this->group;
25
    }
26
27
    public function getStrategy(): string|null
28
    {
29
        return $this->strategy;
30
    }
31
32
    public function getDescription(): string|null
33
    {
34
        return $this->description;
35
    }
36
37
    public function getType(): string|null
38
    {
39
        return $this->type;
40
    }
41
42
    /** @return string[] */
43
    public function getExcludeCriteria(): array
44
    {
45
        return $this->excludeCriteria;
46
    }
47
}
48