Completed
Pull Request — master (#1)
by Ondrej
01:51
created

IdentityContext::getRoles()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
namespace SpareParts\Overseer\Context;
3
4
5
class IdentityContext implements IVotingContext
6
{
7
8
	/**
9
	 * @var mixed
10
	 */
11
	private $id;
12
13
	/**
14
	 * @var string[]
15
	 */
16
	private $roles;
17
18
19
	/**
20
	 * VotingContext constructor.
21
	 * @param mixed $id
22
	 * @param string[] $roles
23
	 */
24
	public function __construct($id, array $roles)
25
	{
26
		$this->id = $id;
27
		$this->roles = $roles;
28
	}
29
30
31
	/**
32
	 * @return mixed
33
	 */
34
	public function getId()
35
	{
36
		return $this->id;
37
	}
38
39
40
	/**
41
	 * @return string[]
42
	 */
43
	public function getRoles()
44
	{
45
		return $this->roles;
46
	}
47
}
48