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