Passed
Pull Request — master (#13)
by
unknown
13:38
created

Error::getMessage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ElevenLabs\Api\Service\Resource;
6
7
/**
8
 * Class Error.
9
 */
10
class Error implements ErrorInterface
11
{
12
    /**
13
     * @var int
14
     */
15
    private $code;
16
17
    /**
18
     * @var string
19
     */
20
    private $message;
21
22
    /**
23
     * @var array
24
     */
25
    private $violations;
26
27
    public function __construct(int $code, string $message, array $violations)
28
    {
29
        $this->code = $code;
30
        $this->message = $message;
31
        $this->violations = $violations;
32
    }
33
34
    /**
35
     * @return int
36
     */
37
    public function getCode(): int
38
    {
39
        return $this->code;
40
    }
41
42
    /**
43
     * @return string
44
     */
45
    public function getMessage(): string
46
    {
47
        return $this->message;
48
    }
49
50
    /**
51
     * @return array
52
     */
53
    public function getViolations(): array
54
    {
55
        return $this->violations;
56
    }
57
}
58