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

IdentityContext   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 43
ccs 0
cts 13
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getId() 0 4 1
A getRoles() 0 4 1
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