Passed
Pull Request — main (#102)
by Tom
03:19
created

Field::getDescription()   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
    public function __construct(
0 ignored issues
show
introduced by
Method \ApiSkeletons\Doctrine\GraphQL\Attribute\Field::__construct() does not have @param annotation for its traversable parameter $excludeCriteria.
Loading history...
13
        protected string $group = 'default',
14
        protected string|null $strategy = null,
15
        protected string|null $description = null,
16
        protected string|null $type = null,
17
        private array $excludeCriteria = [],
18
    ) {
19
    }
20
21
    public function getGroup(): string
22
    {
23
        return $this->group;
24
    }
25
26
    public function getStrategy(): string|null
27
    {
28
        return $this->strategy;
29
    }
30
31
    public function getDescription(): string|null
32
    {
33
        return $this->description;
34
    }
35
36
    public function getType(): string|null
37
    {
38
        return $this->type;
39
    }
40
41
    /** @return string[] */
42
    public function getExcludeCriteria(): array
43
    {
44
        return $this->excludeCriteria;
45
    }
46
}
47