Completed
Push — master ( 0f7b0a...750008 )
by Christoffer
02:09
created

ValidationContextAwareTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getValidationContext() 0 3 1
A setValidationContext() 0 4 1
1
<?php
2
3
namespace Digia\GraphQL\Validation;
4
5
trait ValidationContextAwareTrait
6
{
7
    /**
8
     * @var ValidationContextInterface
9
     */
10
    protected $validationContext;
11
12
    /**
13
     * @return ValidationContextInterface
14
     */
15
    public function getValidationContext(): ValidationContextInterface
16
    {
17
        return $this->validationContext;
18
    }
19
20
    /**
21
     * @param ValidationContextInterface $validationContext
22
     * @return $this
23
     */
24
    public function setValidationContext(ValidationContextInterface $validationContext)
25
    {
26
        $this->validationContext = $validationContext;
27
        return $this;
28
    }
29
}
30