Completed
Push — master ( d312aa...bbe9f1 )
by Sam
03:12
created

AuthenticationResponse   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 2
Metric Value
wmc 2
c 2
b 0
f 2
lcom 0
cbo 1
dl 0
loc 27
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getStatus() 0 4 1
1
<?php
2
3
namespace Jalle19\StatusManager\Message\Response;
4
5
use Jalle19\StatusManager\Message\AbstractMessage;
6
7
/**
8
 * Class AuthenticationResponse
9
 * @package   Jalle19\StatusManager\Message\Response
10
 * @copyright Copyright &copy; Sam Stenvall 2016-
11
 * @license   https://www.gnu.org/licenses/gpl.html The GNU General Public License v2.0
12
 */
13
class AuthenticationResponse extends AbstractMessage
14
{
15
16
	const STATUS_SUCCESS = 'success';
17
	const STATUS_FAILURE = 'failure';
18
19
20
	/**
21
	 * AuthenticationResponse constructor.
22
	 *
23
	 * @param string $status
24
	 */
25 4
	public function __construct($status)
26
	{
27 4
		parent::__construct(AbstractMessage::TYPE_AUTHENTICATION_RESPONSE, $status);
28 4
	}
29
30
31
	/**
32
	 * @return string
33
	 */
34 2
	public function getStatus()
35
	{
36 2
		return $this->getPayload();
37
	}
38
39
}
40