Total Complexity | 7 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Coverage | 93.33% |
Changes | 0 |
1 | <?php |
||
7 | trait Attachable |
||
8 | { |
||
9 | |||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | protected $_name; |
||
14 | |||
15 | /** |
||
16 | * Attachable constructor. |
||
17 | * |
||
18 | * @param string $key |
||
19 | * @param array $storage |
||
20 | */ |
||
21 | 5 | protected function initializer(string $key, array $storage): void |
|
22 | { |
||
23 | 5 | $this->_name = $key; |
|
24 | 5 | $this->attached($storage); |
|
25 | 5 | } |
|
26 | |||
27 | /** |
||
28 | * @param array $storage |
||
29 | * @return array |
||
30 | */ |
||
31 | protected function filter(array $storage): array |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @param string $key |
||
41 | */ |
||
42 | 5 | protected function checkProperty(string $key): void |
|
46 | } |
||
47 | 5 | } |
|
48 | |||
49 | /** |
||
50 | * @param array $storage |
||
51 | */ |
||
52 | 5 | protected function attached(array $storage): void |
|
60 |