@@ -17,9 +17,9 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | public function __construct(array $config = NULL) |
| 19 | 19 | { |
| 20 | - if($config !== NULL){ |
|
| 20 | + if ($config !== NULL) { |
|
| 21 | 21 | $this->setConfig($config); |
| 22 | - if(isset($config['basePath'])){ |
|
| 22 | + if (isset($config['basePath'])) { |
|
| 23 | 23 | $this->setBasePath($config['basePath']); |
| 24 | 24 | } |
| 25 | 25 | } |
@@ -52,11 +52,11 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | public function createCssControl($section) |
| 54 | 54 | { |
| 55 | - if(!isset($this->config[$section])){ |
|
| 55 | + if (!isset($this->config[$section])) { |
|
| 56 | 56 | throw new \InvalidArgumentException("Section $section not found. Did you set it in config?"); |
| 57 | 57 | } |
| 58 | 58 | $control = new CssControl(); |
| 59 | - if(isset($this->config[$section]['css'])){ |
|
| 59 | + if (isset($this->config[$section]['css'])) { |
|
| 60 | 60 | $control->setFiles($this->config[$section]['css']); |
| 61 | 61 | } |
| 62 | 62 | $control->setBasePath($this->basePath); |
@@ -66,11 +66,11 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | public function createJsControl($section) |
| 68 | 68 | { |
| 69 | - if(!isset($this->config[$section])){ |
|
| 69 | + if (!isset($this->config[$section])) { |
|
| 70 | 70 | throw new \InvalidArgumentException("Section $section not found. Did you set it in config?"); |
| 71 | 71 | } |
| 72 | 72 | $control = new JsControl(); |
| 73 | - if(isset($this->config[$section]['js'])) { |
|
| 73 | + if (isset($this->config[$section]['js'])) { |
|
| 74 | 74 | $control->setFiles($this->config[$section]['js']); |
| 75 | 75 | } |
| 76 | 76 | $control->setBasePath($this->basePath); |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | protected function formatFileUrl($file) |
| 55 | 55 | { |
| 56 | 56 | $appendix = ''; |
| 57 | - if(is_file($this->basePath . '/' . $file)){ |
|
| 57 | + if (is_file($this->basePath . '/' . $file)) { |
|
| 58 | 58 | $appendix = '?' . md5(filemtime($this->basePath . '/' . $file)); |
| 59 | 59 | } |
| 60 | 60 | |