| Conditions | 4 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 69 | public static function openBrowser($url): void |
||
| 70 | { |
||
| 71 | if (self::isWindows()) { |
||
| 72 | passthru('start "web" explorer "'.$url.'"'); |
||
| 73 | } else { |
||
| 74 | passthru('which xdg-open', $linux); |
||
| 75 | passthru('which open', $osx); |
||
| 76 | if (0 === $linux) { |
||
| 77 | passthru('xdg-open '.$url); |
||
| 78 | } elseif (0 === $osx) { |
||
| 79 | passthru('open '.$url); |
||
| 80 | } |
||
| 113 |
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.