Passed
Pull Request — main (#119)
by Tom
03:24
created

FilterCriteria   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Importance

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

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
    public function __construct(
0 ignored issues
show
introduced by
Method \ApiSkeletons\Doctrine\GraphQL\Event\FilterCriteria::__construct() does not have @param annotation for its traversable parameter $args.
Loading history...
15
        protected Criteria $criteria,
16
        protected string $eventName,
17
        protected mixed $objectValue,
18
        protected array $args,
19
        protected mixed $context,
20
        protected ResolveInfo $info,
21
    ) {
22
    }
23
24
    public function eventName(): string
25
    {
26
        return $this->eventName;
27
    }
28
29
    public function getCriteria(): Criteria
30
    {
31
        return $this->criteria;
32
    }
33
34
    public function getObjectValue(): mixed
35
    {
36
        return $this->objectValue;
37
    }
38
39
    /** @return mixed[] */
40
    public function getArgs(): array
41
    {
42
        return $this->args;
43
    }
44
45
    public function getContext(): mixed
46
    {
47
        return $this->context;
48
    }
49
50
    public function getInfo(): ResolveInfo
51
    {
52
        return $this->info;
53
    }
54
}
55