Passed
Pull Request — main (#154)
by Tom
11:53
created

Association   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 43
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getLimit() 0 3 1
A getFilterCriteriaEventName() 0 3 1
A getGroup() 0 3 1
A __construct() 0 9 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
    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 array $excludeCriteria = [],
23
        protected array $includeCriteria = [],
24
        protected string|null $filterCriteriaEventName = null,
25
        protected int|null $limit = null,
26
    ) {
27
    }
28
29
    public function getLimit(): int|null
30
    {
31
        return $this->limit;
32
    }
33
34
    public function getGroup(): string
35
    {
36
        return $this->group;
37
    }
38
39
    public function getStrategy(): string|null
40
    {
41
        return $this->strategy;
42
    }
43
44
    public function getDescription(): string|null
45
    {
46
        return $this->description;
47
    }
48
49
    public function getFilterCriteriaEventName(): string|null
50
    {
51
        return $this->filterCriteriaEventName;
52
    }
53
}
54