Completed
Push — master ( c6e3b5...fd2349 )
by Milan
15:04 queued 10s
created

Error::getCode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php declare(strict_types=1);
2
3
namespace h4kuna\Ares;
4
5
final class Error
6
{
7
	/** @var string */
8
	private $in;
9
10
	/** @var int */
11
	private $code;
12
13
	/** @var string */
14
	private $message;
15
16
17
	public function __construct(string $in, int $code, string $message)
18
	{
19
		$this->in = $in;
20
		$this->code = $code;
21
		$this->message = $message;
22
	}
23
24
25
	public function getCode(): int
26
	{
27
		return $this->code;
28
	}
29
30
31
	public function getMessage(): string
32
	{
33
		return $this->message;
34
	}
35
36
37
	public function getIn(): string
38
	{
39
		return $this->in;
40
	}
41
42
43
	public function toArray(): array
44
	{
45
		return [
46
			'in' => $this->in,
47
			'code' => $this->code,
48
			'message' => $this->message,
49
		];
50
	}
51
52
}
53