NovaApiError   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 59
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 59
ccs 0
cts 17
cp 0
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getMessage() 0 3 1
A getCode() 0 3 1
A getDetails() 0 3 1
A __construct() 0 5 1
1
<?php
2
3
namespace OrcaServices\NovaApi\Result;
4
5
/**
6
 * Data.
7
 */
8
final class NovaApiError
9
{
10
    /**
11
     * @var string
12
     */
13
    private $code;
14
15
    /**
16
     * @var string
17
     */
18
    private $message;
19
20
    /**
21
     * @var array|null
22
     */
23
    private $details;
24
25
    /**
26
     * Constructor.
27
     *
28
     * @param string $code The code
29
     * @param string $message The message
30
     * @param array|null $details The details
31
     */
32
    public function __construct(string $code, string $message, array $details = null)
33
    {
34
        $this->code = $code;
35
        $this->message = $message;
36
        $this->details = $details;
37
    }
38
39
    /**
40
     * Get value.
41
     *
42
     * @return string code
43
     */
44
    public function getCode(): string
45
    {
46
        return $this->code;
47
    }
48
49
    /**
50
     * Get value.
51
     *
52
     * @return string message
53
     */
54
    public function getMessage(): string
55
    {
56
        return $this->message;
57
    }
58
59
    /**
60
     * Get value.
61
     *
62
     * @return array|null details
63
     */
64
    public function getDetails()
65
    {
66
        return $this->details;
67
    }
68
}
69