Passed
Push — master ( 46c3ee...445208 )
by Rafael
04:28
created

GraphQLFieldEvent::getInfo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
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\Resolver\ResolverContext;
15
16
class GraphQLFieldEvent extends Event
17
{
18
    /**
19
     * @var ResolverContext
20
     */
21
    protected $context;
22
23
    /**
24
     * @var mixed|null
25
     */
26
    protected $value;
27
28
    /**
29
     * GraphQLFieldEvent constructor.
30
     *
31
     * @param ResolverContext $context
32
     * @param mixed|null      $value
33
     */
34 2
    public function __construct(ResolverContext $context, $value = null)
35
    {
36 2
        $this->context = $context;
37 2
        $this->value = $value;
38 2
    }
39
40
    /**
41
     * @return ResolverContext
42
     */
43 2
    public function getContext(): ResolverContext
44
    {
45 2
        return $this->context;
46
    }
47
48
    /**
49
     * @return mixed|null
50
     */
51
    public function getValue()
52
    {
53
        return $this->value;
54
    }
55
56
    /**
57
     * @param mixed $value
58
     */
59
    public function setValue($value): void
60
    {
61
        $this->value = $value;
62
    }
63
}
64