SuccessResponse::isSuccessful()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace HelePartnerSyncApi\Response;
4
5
class SuccessResponse extends Response
6
{
7
8
	/**
9
	 * @var mixed
10
	 */
11
	private $data;
12
13
	/**
14
	 * @param string $secret
15
	 * @param mixed $data
16
	 */
17
	public function __construct($secret, $data)
18
	{
19
		parent::__construct($secret);
20
		$this->data = $data;
21
	}
22
23
	/**
24
	 * @return mixed
25
	 */
26
	public function getData()
27
	{
28
		return $this->data;
29
	}
30
31
	/**
32
	 * @return bool
33
	 */
34
	public function isSuccessful()
35
	{
36
		return true;
37
	}
38
39
	/**
40
	 * @return int
41
	 */
42
	public function getHttpCode()
43
	{
44
		return 200;
45
	}
46
47
	/**
48
	 * @return string
49
	 */
50
	public function getMessage()
51
	{
52
		return 'ok';
53
	}
54
55
}
56