Completed
Push — master ( 8532b6...233c5a )
by Jan
02:42
created

Response::getExtensions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php declare(strict_types = 1);
2
3
namespace SlevomatCsobGateway\Api;
4
5
class Response
6
{
7
8
	/**
9
	 * @var ResponseCode
10
	 */
11
	private $responseCode;
12
13
	/**
14
	 * @var mixed[]|null
15
	 */
16
	private $data;
17
18
	/**
19
	 * @var string[]
20
	 */
21
	private $headers;
22
23
	/** @var mixed[] */
24
	private $extensions;
25
26
	/**
27
	 * @param ResponseCode $responseCode
28
	 * @param mixed[]|null $data
29
	 * @param string[] $headers
30
	 * @param mixed[] $extensions
31
	 */
32
	public function __construct(
33
		ResponseCode $responseCode,
34
		array $data = null,
35
		array $headers = [],
36
		array $extensions = []
37
	)
38
	{
39
		$this->responseCode = $responseCode;
40
		$this->data = $data;
41
		$this->headers = $headers;
42
		$this->extensions = $extensions;
43
	}
44
45
	public function getResponseCode(): ResponseCode
46
	{
47
		return $this->responseCode;
48
	}
49
50
	/**
51
	 * @return mixed[]|null
52
	 */
53
	public function getData()
54
	{
55
		return $this->data;
56
	}
57
58
	/**
59
	 * @return string[]
60
	 */
61
	public function getHeaders(): array
62
	{
63
		return $this->headers;
64
	}
65
66
	/**
67
	 * @return mixed[]
68
	 */
69
	public function getExtensions(): array
70
	{
71
		return $this->extensions;
72
	}
73
74
}
75