Passed
Push — 1.0 ( 468aff...8b7abc )
by David
08:50
created

Role   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 39
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 getLabel() 0 4 1
1
<?php
2
namespace Mouf\Security\Model;
3
4
use Mouf\Security\UserManagement\Api\RoleInterface;
5
6
class Role implements RoleInterface
7
{
8
    /**
9
     * @var mixed
10
     */
11
    private $id;
12
13
    /**
14
     * @var string
15
     */
16
    private $label;
17
18
    /**
19
     * Role constructor.
20
     * @param mixed $id
21
     * @param string $label
22
     */
23
    public function __construct($id, string $label)
24
    {
25
        $this->id = $id;
26
        $this->label = $label;
27
    }
28
29
    /**
30
     * @return mixed
31
     */
32
    public function getId()
33
    {
34
        return $this->id;
35
    }
36
37
    /**
38
     * @return string
39
     */
40
    public function getLabel(): string
41
    {
42
        return $this->label;
43
    }
44
}