Passed
Push — main ( f1f4db...d0cb76 )
by Tom
59s queued 13s
created

Association   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
c 0
b 0
f 0
dl 0
loc 37
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getFilterCriteriaEventName() 0 3 1
A getGroup() 0 3 1
A __construct() 0 7 1
A getExcludeCriteria() 0 3 1
A getDescription() 0 3 1
A getStrategy() 0 3 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 Association
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 array $excludeCriteria = [],
18
        protected string|null $filterCriteriaEventName = null,
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
    /** @return string[] */
38
    public function getExcludeCriteria(): array
39
    {
40
        return $this->excludeCriteria;
41
    }
42
43
    public function getFilterCriteriaEventName(): string|null
44
    {
45
        return $this->filterCriteriaEventName;
46
    }
47
}
48