Completed
Pull Request — master (#45)
by Christoffer
02:04
created

ContextAwareTrait::setContext()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Digia\GraphQL\Validation\Rule;
4
5
use Digia\GraphQL\Validation\ValidationContext;
6
7
trait ContextAwareTrait
8
{
9
    /**
10
     * @var ValidationContext
11
     */
12
    protected $context;
13
14
    /**
15
     * @return ValidationContext
16
     */
17
    public function getContext(): ValidationContext
18
    {
19
        return $this->context;
20
    }
21
22
    /**
23
     * @param ValidationContext $context
24
     * @return $this
25
     */
26
    public function setContext(ValidationContext $context)
27
    {
28
        $this->context = $context;
29
        return $this;
30
    }
31
}
32