Total Complexity | 8 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 71.43% |
Changes | 2 | ||
Bugs | 2 | Features | 0 |
1 | <?php |
||
7 | class CacheTagsNormalizer implements NormalizerContract |
||
8 | { |
||
9 | /** |
||
10 | * ّFigures out what the cache tags should be. |
||
11 | * |
||
12 | * @param object $widget |
||
13 | * @return void |
||
14 | */ |
||
15 | 24 | public function normalize($widget): void |
|
23 | } |
||
24 | 24 | } |
|
25 | |||
26 | /** |
||
27 | * @param $widget |
||
28 | * @param null $tag |
||
|
|||
29 | */ |
||
30 | private function errorOut($widget, $tag = null): void |
||
31 | { |
||
32 | $tag = $tag ? ' '.$tag.'is not string' : ''; |
||
33 | throw new \InvalidArgumentException('Cache Tags on "'.get_class($widget).'" must be of type Array with String elements.'.$tag); |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @param $widget |
||
38 | */ |
||
39 | 1 | protected function checkTagForString($widget): void |
|
44 | } |
||
45 | } |
||
48 |