Total Complexity | 4 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php namespace App\Utilities; |
||
7 | class HandleNullState extends Twig_Extension |
||
8 | { |
||
9 | /** |
||
10 | * Functions |
||
11 | * @return array |
||
|
|||
12 | */ |
||
13 | 19 | public function getFunctions(): array |
|
17 | ]; |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * This function checks if the argument is empty, if false then it will echo html for null state given, |
||
22 | * if true then return default html. |
||
23 | * |
||
24 | * @param string|integer|float|null $output |
||
1 ignored issue
–
show
|
|||
25 | * @param string|null $outputHtml |
||
1 ignored issue
–
show
|
|||
26 | * @param string $nullStateHtml |
||
1 ignored issue
–
show
|
|||
27 | * |
||
28 | * @return void |
||
29 | */ |
||
30 | 4 | public function handleNullState($output, $outputHtml, string $nullStateHtml): void |
|
39 |