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

Reason::getResponseName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
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