GraphQLOperationEvent::getEndpoint()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 3
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
/*******************************************************************************
3
 *  This file is part of the GraphQL Bundle package.
4
 *
5
 *  (c) YnloUltratech <[email protected]>
6
 *
7
 *  For the full copyright and license information, please view the LICENSE
8
 *  file that was distributed with this source code.
9
 ******************************************************************************/
10
11
namespace Ynlo\GraphQLBundle\Events;
12
13
use Symfony\Component\EventDispatcher\Event;
14
use Ynlo\GraphQLBundle\Definition\Registry\Endpoint;
15
use Ynlo\GraphQLBundle\Request\ExecuteQuery;
16
17
class GraphQLOperationEvent extends Event
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Component\EventDispatcher\Event has been deprecated: since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

17
class GraphQLOperationEvent extends /** @scrutinizer ignore-deprecated */ Event
Loading history...
18
{
19
    /**
20
     * @var ExecuteQuery
21
     */
22
    protected $operation;
23
24
    /**
25
     * @var Endpoint
26
     */
27
    protected $endpoint;
28
29
    /**
30
     * GraphQLOperationEvent constructor.
31
     *
32
     * @param ExecuteQuery $operation
33
     * @param Endpoint     $endpoint
34
     */
35
    public function __construct(ExecuteQuery $operation, Endpoint $endpoint)
36
    {
37
        $this->operation = $operation;
38
        $this->endpoint = $endpoint;
39
    }
40
41
    /**
42
     * @return ExecuteQuery
43
     */
44
    public function getOperation(): ExecuteQuery
45
    {
46
        return $this->operation;
47
    }
48
49
    /**
50
     * @return Endpoint
51
     */
52
    public function getEndpoint(): Endpoint
53
    {
54
        return $this->endpoint;
55
    }
56
}
57