| Total Complexity | 6 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 16 | class Asset extends AbstractAsset |
||
| 17 | { |
||
| 18 | protected $asset = []; |
||
| 19 | protected $fileLoaded = false; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Loads a file. |
||
| 23 | * |
||
| 24 | * @param string $path |
||
| 25 | * |
||
| 26 | * @return self |
||
| 27 | */ |
||
| 28 | public function getFile(string $path): self |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | public function __toString(): string |
||
| 49 | { |
||
| 50 | return $this->asset['path']; |
||
| 51 | } |
||
| 52 | |||
| 53 | public function getHtml(): string |
||
| 66 | } |
||
| 67 | } |
||
| 69 |
The
breakstatement is not necessary if it is preceded for example by areturnstatement:If you would like to keep this construct to be consistent with other
casestatements, you can safely mark this issue as a false-positive.