@@ -115,14 +115,14 @@ |
||
| 115 | 115 | } |
| 116 | 116 | $controller = $this->resolveClass($middleware[0], $info['path'], $info['namespace']); |
| 117 | 117 | if (method_exists($controller, 'handle')) { |
| 118 | - $return = call_user_func_array([$controller, 'handle'], $params); |
|
| 119 | - if($return != true) { |
|
| 120 | - echo $return; |
|
| 121 | - exit; |
|
| 118 | + $return = call_user_func_array([$controller, 'handle'], $params); |
|
| 119 | + if($return != true) { |
|
| 120 | + echo $return; |
|
| 121 | + exit; |
|
| 122 | 122 | |
| 123 | 123 | } else { |
| 124 | - return $return; |
|
| 125 | - } |
|
| 124 | + return $return; |
|
| 125 | + } |
|
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | return $this->exception('handle() method is not found in <b>' . $command . '</b> class.'); |
@@ -115,8 +115,8 @@ |
||
| 115 | 115 | } |
| 116 | 116 | $controller = $this->resolveClass($middleware[0], $info['path'], $info['namespace']); |
| 117 | 117 | if (method_exists($controller, 'handle')) { |
| 118 | - $return = call_user_func_array([$controller, 'handle'], $params); |
|
| 119 | - if($return != true) { |
|
| 118 | + $return = call_user_func_array([$controller, 'handle'], $params); |
|
| 119 | + if ($return != true) { |
|
| 120 | 120 | echo $return; |
| 121 | 121 | exit; |
| 122 | 122 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | header('Content-Type: text/css; charset: UTF-8'); |
| 32 | 32 | header('Cache-Control: must-revalidate'); |
| 33 | - header('Expires: ' . gmdate('D, d M Y H:i:s' , time() + $expire) . ' GMT'); |
|
| 33 | + header('Expires: ' . gmdate('D, d M Y H:i:s', time() + $expire) . ' GMT'); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | public function dump_style() |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | ob_end_flush(); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - private function get_cache_name($filename , $wildcard = FALSE) |
|
| 47 | + private function get_cache_name($filename, $wildcard = FALSE) |
|
| 48 | 48 | { |
| 49 | 49 | $stat = stat($filename); |
| 50 | 50 | return $this->cwd . $filename . '.' . |
@@ -62,17 +62,17 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | private function compress($buffer) |
| 64 | 64 | { |
| 65 | - $buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!' , '' , $buffer); |
|
| 66 | - $buffer = str_replace(array("\r\n" , "\r" , "\n" , "\t" , ' ') , '' , $buffer); |
|
| 67 | - $buffer = str_replace('{ ' , '{' , $buffer); |
|
| 68 | - $buffer = str_replace(' }' , '}' , $buffer); |
|
| 69 | - $buffer = str_replace('; ' , ';' , $buffer); |
|
| 70 | - $buffer = str_replace(', ' , ',' , $buffer); |
|
| 71 | - $buffer = str_replace(' {' , '{' , $buffer); |
|
| 72 | - $buffer = str_replace('} ' , '}' , $buffer); |
|
| 73 | - $buffer = str_replace(': ' , ':' , $buffer); |
|
| 74 | - $buffer = str_replace(',' , ',' , $buffer); |
|
| 75 | - $buffer = str_replace(' ;' , ';' , $buffer); |
|
| 65 | + $buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer); |
|
| 66 | + $buffer = str_replace(array("\r\n", "\r", "\n", "\t", ' '), '', $buffer); |
|
| 67 | + $buffer = str_replace('{ ', '{', $buffer); |
|
| 68 | + $buffer = str_replace(' }', '}', $buffer); |
|
| 69 | + $buffer = str_replace('; ', ';', $buffer); |
|
| 70 | + $buffer = str_replace(', ', ',', $buffer); |
|
| 71 | + $buffer = str_replace(' {', '{', $buffer); |
|
| 72 | + $buffer = str_replace('} ', '}', $buffer); |
|
| 73 | + $buffer = str_replace(': ', ':', $buffer); |
|
| 74 | + $buffer = str_replace(',', ',', $buffer); |
|
| 75 | + $buffer = str_replace(' ;', ';', $buffer); |
|
| 76 | 76 | return $buffer; |
| 77 | 77 | } |
| 78 | 78 | |
@@ -87,13 +87,13 @@ discard block |
||
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | // remove any old, lingering caches for this file |
| 90 | - if ($dead_files = glob($this->get_cache_name($filename , TRUE) , GLOB_NOESCAPE)) { |
|
| 90 | + if ($dead_files = glob($this->get_cache_name($filename, TRUE), GLOB_NOESCAPE)) { |
|
| 91 | 91 | foreach ($dead_files as $dead_file) |
| 92 | 92 | unlink($dead_file); |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | $compressed = $this->compress(file_get_contents($filename)); |
| 96 | - file_put_contents($current_cache , $compressed); |
|
| 96 | + file_put_contents($current_cache, $compressed); |
|
| 97 | 97 | |
| 98 | 98 | echo $compressed; |
| 99 | 99 | } |
@@ -54,8 +54,9 @@ discard block |
||
| 54 | 54 | private function style_changed() |
| 55 | 55 | { |
| 56 | 56 | foreach ($this->filenames as $filename) { |
| 57 | - if (!is_file($this->get_cache_name($filename))) |
|
| 58 | - return true; |
|
| 57 | + if (!is_file($this->get_cache_name($filename))) { |
|
| 58 | + return true; |
|
| 59 | + } |
|
| 59 | 60 | } |
| 60 | 61 | return false; |
| 61 | 62 | } |
@@ -88,8 +89,9 @@ discard block |
||
| 88 | 89 | |
| 89 | 90 | // remove any old, lingering caches for this file |
| 90 | 91 | if ($dead_files = glob($this->get_cache_name($filename , TRUE) , GLOB_NOESCAPE)) { |
| 91 | - foreach ($dead_files as $dead_file) |
|
| 92 | - unlink($dead_file); |
|
| 92 | + foreach ($dead_files as $dead_file) { |
|
| 93 | + unlink($dead_file); |
|
| 94 | + } |
|
| 93 | 95 | } |
| 94 | 96 | |
| 95 | 97 | $compressed = $this->compress(file_get_contents($filename)); |
@@ -280,7 +280,7 @@ |
||
| 280 | 280 | if (!is_array($params)) { |
| 281 | 281 | throw new \InvalidArgumentException("Arguments is not a Array" . print_r($params, true)); |
| 282 | 282 | } |
| 283 | - $o =''; |
|
| 283 | + $o = ''; |
|
| 284 | 284 | $o .= (isset($params['id'])) ? " id='{$params['id']}'" : ''; |
| 285 | 285 | $o .= (isset($params['name'])) ? " name='{$params['name']}'" : ''; |
| 286 | 286 | $o .= (isset($params['value'])) ? " value='{$params['value']}'" : ''; |