Role   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 10
c 1
b 0
f 0
dl 0
loc 22
ccs 9
cts 9
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A __toString() 0 3 1
1
<?php
2
3
namespace ProyectoTAU\TAU\Module\Administration\Role\Domain;
4
5
use ProyectoTAU\TAU\Common\PropertiesBag;
6
use ProyectoTAU\TAU\Common\SettersBag;
7
8
/**
9
 * @method void setId(int $id)
10
 * @method int getId()
11
 * @method void setName(string $name)
12
 * @method string getName()
13
 * @method void setDesc(string $desc)
14
 * @method string getDesc()
15
 */
16
class Role
17
{
18
    use PropertiesBag;
19
    use SettersBag;
20
21
    use RoleUseCases;
22
23 52
     public function __construct($id, $name, $desc)
24
     {
25 52
        $this->setPropertiesBag(['id', 'name', 'desc']);
26 52
        $this->setSettersBag($this->getPropertiesBag());
27
28 52
        $this->setId($id);
29 52
        $this->setName($name);
30 52
        $this->setDesc($desc);
31
32
		// TODO: Raise CreateRoleDomainEvent($this)
33 52
     }
34
35 2
    public function __toString()
36
    {
37 2
        return $this->propertiesBagToString();
38
    }
39
}
40