Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
53 | public function getHtml(): string |
||
54 | { |
||
55 | if (!$this->fileLoaded) { |
||
56 | throw new Exception(\sprintf('%s() error: you must load a file first.', __FUNCTION__)); |
||
57 | } |
||
58 | |||
59 | switch ($this->asset['ext']) { |
||
60 | case 'css': |
||
61 | return \sprintf('<link rel="stylesheet" href="%s">', $this->asset['path']); |
||
62 | break; |
||
|
|||
63 | default: |
||
64 | return 'POUET'; |
||
65 | break; |
||
66 | } |
||
69 |
The
break
statement is not necessary if it is preceded for example by areturn
statement:If you would like to keep this construct to be consistent with other
case
statements, you can safely mark this issue as a false-positive.