| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | public static function toCss(string $sFile) |
||
| 46 | { |
||
| 47 | if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { |
||
| 48 | |||
| 49 | $sCmd = self::LESS_WINDOWS." ".$sFile." --watch"; |
||
| 50 | $sContent = shell_exec($sCmd); |
||
| 51 | } |
||
| 52 | else { |
||
| 53 | |||
| 54 | $sCmd = "lessc ".$sFile." --no-color 2>&1"; |
||
| 55 | $sContent = shell_exec($sCmd); |
||
| 56 | } |
||
| 57 | |||
| 58 | header("content-type:text/css"); |
||
| 59 | echo $sContent; |
||
| 60 | } |
||
| 61 | } |
||
| 62 |