Role::__toString()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 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