Passed
Branch main (0cd36c)
by Tom
03:14 queued 39s
created

QueryBuilder::getArgs()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ApiSkeletons\Doctrine\ORM\GraphQL\Event;
6
7
use Doctrine\ORM\QueryBuilder as DoctrineQueryBuilder;
8
use GraphQL\Type\Definition\ResolveInfo;
9
use League\Event\HasEventName;
10
11
/**
12
 * This event is fired when the QueryBuilder is created for an entity
13
 */
14
class QueryBuilder implements
15
    HasEventName
16
{
17
    /**
18
     * @param string[] $entityAliasMap
19
     * @param mixed[]  $args
20
     */
21
    public function __construct(
22
        protected DoctrineQueryBuilder $queryBuilder,
23
        protected string $eventName,
24
        protected mixed $objectValue,
25
        protected array $args,
26
        protected mixed $context,
27
        protected ResolveInfo $info,
28
    ) {
29
    }
30
31
    public function eventName(): string
32
    {
33
        return $this->eventName;
34
    }
35
36
    public function getQueryBuilder(): DoctrineQueryBuilder
37
    {
38
        return $this->queryBuilder;
39
    }
40
41
    public function getObjectValue(): mixed
42
    {
43
        return $this->objectValue;
44
    }
45
46
    /** @return mixed[] */
47
    public function getArgs(): array
48
    {
49
        return $this->args;
50
    }
51
52
    public function getContext(): mixed
53
    {
54
        return $this->context;
55
    }
56
57
    public function getInfo(): ResolveInfo
58
    {
59
        return $this->info;
60
    }
61
}
62