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

FilterCriteria   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Importance

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

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getArgs() 0 3 1
A getInfo() 0 3 1
A getCriteria() 0 3 1
A getContext() 0 3 1
A __construct() 0 8 1
A eventName() 0 3 1
A getObjectValue() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ApiSkeletons\Doctrine\GraphQL\Event;
6
7
use Doctrine\Common\Collections\Criteria;
8
use GraphQL\Type\Definition\ResolveInfo;
9
use League\Event\HasEventName;
10
11
class FilterCriteria implements
12
    HasEventName
13
{
14
    /** @param mixed[] $args */
15
    public function __construct(
16
        protected Criteria $criteria,
17
        protected string $eventName,
18
        protected mixed $objectValue,
19
        protected array $args,
20
        protected mixed $context,
21
        protected ResolveInfo $info,
22
    ) {
23
    }
24
25
    public function eventName(): string
26
    {
27
        return $this->eventName;
28
    }
29
30
    public function getCriteria(): Criteria
31
    {
32
        return $this->criteria;
33
    }
34
35
    public function getObjectValue(): mixed
36
    {
37
        return $this->objectValue;
38
    }
39
40
    /** @return mixed[] */
41
    public function getArgs(): array
42
    {
43
        return $this->args;
44
    }
45
46
    public function getContext(): mixed
47
    {
48
        return $this->context;
49
    }
50
51
    public function getInfo(): ResolveInfo
52
    {
53
        return $this->info;
54
    }
55
}
56