Passed
Pull Request — master (#69)
by Christoffer
02:29
created

Reason   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
dl 0
loc 37
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getResponseName() 0 3 1
A getReason() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
namespace Digia\GraphQL\Validation\Conflict;
4
5
class Reason
6
{
7
    /**
8
     * @var string
9
     */
10
    protected $responseName;
11
12
    /**
13
     * @var array|string
14
     */
15
    protected $reason;
16
17
    /**
18
     * Reason constructor.
19
     * @param string       $responseName
20
     * @param array|string $reason
21
     */
22
    public function __construct(string $responseName, $reason)
23
    {
24
        $this->responseName = $responseName;
25
        $this->reason       = $reason;
26
    }
27
28
    /**
29
     * @return string
30
     */
31
    public function getResponseName(): string
32
    {
33
        return $this->responseName;
34
    }
35
36
    /**
37
     * @return array|string
38
     */
39
    public function getReason()
40
    {
41
        return $this->reason;
42
    }
43
}
44