Total Complexity | 6 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class StackName implements INotify |
||
15 | { |
||
16 | protected INotify $notify; |
||
17 | protected string $prefix = ''; |
||
18 | protected string $suffix = ''; |
||
19 | |||
20 | 1 | public function __construct(INotify $storage, string $prefix = '', string $suffix = '') |
|
25 | 1 | } |
|
26 | |||
27 | 1 | public function add(string $stackName, string $message): void |
|
28 | { |
||
29 | 1 | $this->notify->add($this->updateName($stackName), $message); |
|
30 | 1 | } |
|
31 | |||
32 | 1 | public function check(string $stackName): bool |
|
35 | } |
||
36 | |||
37 | 1 | public function get(string $stackName): array |
|
38 | { |
||
39 | 1 | return $this->notify->get($this->updateName($stackName)); |
|
40 | } |
||
41 | |||
42 | 1 | public function reset(string $stackName): void |
|
43 | { |
||
44 | 1 | $this->notify->reset($this->updateName($stackName)); |
|
45 | 1 | } |
|
46 | |||
47 | 1 | protected function updateName(string $stackName): string |
|
50 | } |
||
51 | } |
||
52 |