Passed
Pull Request — main (#128)
by Tom
02:54
created

Field::getType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
rs 10
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
    use ExcludeCriteria;
13
14
    /**
15
     * @param string[] $excludeCriteria
16
     * @param string[] $includeCriteria
17
     */
18
    public function __construct(
19
        protected string $group = 'default',
20
        protected string|null $strategy = null,
21
        protected string|null $description = null,
22
        protected string|null $type = null,
23
        private array $excludeCriteria = [],
24
        private array $includeCriteria = [],
25
    ) {
26
    }
27
28
    public function getGroup(): string
29
    {
30
        return $this->group;
31
    }
32
33
    public function getStrategy(): string|null
34
    {
35
        return $this->strategy;
36
    }
37
38
    public function getDescription(): string|null
39
    {
40
        return $this->description;
41
    }
42
43
    public function getType(): string|null
44
    {
45
        return $this->type;
46
    }
47
}
48