Total Complexity | 4 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
14 | class Authorization |
||
15 | { |
||
16 | private $name; |
||
17 | |||
18 | private $description; |
||
19 | |||
20 | 6 | public function __construct(string $name, ?string $description = null) |
|
21 | { |
||
22 | 6 | $this->name = $name; |
|
23 | 6 | $this->description = $description; |
|
24 | 6 | } |
|
25 | |||
26 | 6 | public static function fake(string $name, ?string $description = null): Authorization |
|
27 | { |
||
28 | 6 | return new static($name, $description); |
|
29 | } |
||
30 | |||
31 | 6 | public function getName(): string |
|
32 | { |
||
33 | 6 | return $this->name; |
|
34 | } |
||
35 | |||
36 | 6 | public function getDescription(): ?string |
|
39 | } |
||
40 | } |
||
41 |