Field   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
eloc 7
c 2
b 0
f 1
dl 0
loc 37
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 3 1
A getDescription() 0 3 1
A getGroup() 0 3 1
A getStrategy() 0 3 1
A __construct() 0 8 1
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