QueryBuilder   A
last analyzed

Complexity

Total Complexity 9

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
dl 0
loc 56
rs 10
c 1
b 0
f 0
wmc 9

9 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
A getQueryBuilder() 0 3 1
A getInfo() 0 3 1
A getObjectValue() 0 3 1
A getContext() 0 3 1
A getOffset() 0 3 1
A getLimit() 0 3 1
A getArgs() 0 3 1
A eventName() 0 4 1
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
use Override;
0 ignored issues
show
Bug introduced by
The type Override was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
11
12
/**
13
 * This event is fired when the QueryBuilder is created for an entity
14
 */
15
class QueryBuilder implements
16
    HasEventName
17
{
18
    /** @param mixed[] $args */
19
    public function __construct(
20
        protected readonly string $eventName,
21
        protected readonly DoctrineQueryBuilder $queryBuilder,
22
        protected readonly int $offset,
23
        protected readonly int $limit,
24
        protected readonly mixed $objectValue,
25
        protected readonly array $args,
26
        protected readonly mixed $context,
27
        protected readonly ResolveInfo $info,
28
    ) {
29
    }
30
31
    #[Override]
32
    public function eventName(): string
33
    {
34
        return $this->eventName;
35
    }
36
37
    public function getQueryBuilder(): DoctrineQueryBuilder
38
    {
39
        return $this->queryBuilder;
40
    }
41
42
    public function getOffset(): int
43
    {
44
        return $this->offset;
45
    }
46
47
    public function getLimit(): int
48
    {
49
        return $this->limit;
50
    }
51
52
    public function getObjectValue(): mixed
53
    {
54
        return $this->objectValue;
55
    }
56
57
    /** @return mixed[] */
58
    public function getArgs(): array
59
    {
60
        return $this->args;
61
    }
62
63
    public function getContext(): mixed
64
    {
65
        return $this->context;
66
    }
67
68
    public function getInfo(): ResolveInfo
69
    {
70
        return $this->info;
71
    }
72
}
73