Conditions | 4 |
Paths | 4 |
Total Lines | 13 |
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 | |||
74 | return; |
||
75 | } |
||
76 | passthru('which xdg-open', $linux); |
||
77 | passthru('which open', $osx); |
||
78 | if (0 === $linux) { |
||
79 | passthru('xdg-open '.$url); |
||
80 | } elseif (0 === $osx) { |
||
81 | passthru('open '.$url); |
||
82 | } |
||
111 |