@@ -61,8 +61,7 @@ discard block |
||
| 61 | 61 | while(($module = readdir($moduleDir)) !== false){ |
| 62 | 62 | if(preg_match('/^([a-z0-9-_]+)$/i', $module) && is_dir(MODULE_PATH . $module)){ |
| 63 | 63 | self::$list[] = $module; |
| 64 | - } |
|
| 65 | - else{ |
|
| 64 | + } else{ |
|
| 66 | 65 | $logger->info('Skipping [' .$module. '], may be this is not a directory or does not exists or is invalid name'); |
| 67 | 66 | } |
| 68 | 67 | } |
@@ -152,8 +151,7 @@ discard block |
||
| 152 | 151 | if(file_exists($filePath)){ |
| 153 | 152 | $logger->info('Found controller [' . $class . '] in module [' .$module. '], the file path is [' .$filePath. ']'); |
| 154 | 153 | return $filePath; |
| 155 | - } |
|
| 156 | - else{ |
|
| 154 | + } else{ |
|
| 157 | 155 | $logger->info('Controller [' . $class . '] does not exist in the module [' .$module. ']'); |
| 158 | 156 | return false; |
| 159 | 157 | } |
@@ -179,8 +177,7 @@ discard block |
||
| 179 | 177 | if(file_exists($filePath)){ |
| 180 | 178 | $logger->info('Found model [' . $class . '] in module [' .$module. '], the file path is [' .$filePath. ']'); |
| 181 | 179 | return $filePath; |
| 182 | - } |
|
| 183 | - else{ |
|
| 180 | + } else{ |
|
| 184 | 181 | $logger->info('Model [' . $class . '] does not exist in the module [' .$module. ']'); |
| 185 | 182 | return false; |
| 186 | 183 | } |
@@ -205,8 +202,7 @@ discard block |
||
| 205 | 202 | if(file_exists($filePath)){ |
| 206 | 203 | $logger->info('Found configuration [' . $configuration . '] in module [' .$module. '], the file path is [' .$filePath. ']'); |
| 207 | 204 | return $filePath; |
| 208 | - } |
|
| 209 | - else{ |
|
| 205 | + } else{ |
|
| 210 | 206 | $logger->info('Configuration [' . $configuration . '] does not exist in the module [' .$module. ']'); |
| 211 | 207 | return false; |
| 212 | 208 | } |
@@ -232,8 +228,7 @@ discard block |
||
| 232 | 228 | if(file_exists($filePath)){ |
| 233 | 229 | $logger->info('Found helper [' . $helper . '] in module [' .$module. '], the file path is [' .$filePath. ']'); |
| 234 | 230 | return $filePath; |
| 235 | - } |
|
| 236 | - else{ |
|
| 231 | + } else{ |
|
| 237 | 232 | $logger->info('Helper [' . $helper . '] does not exist in the module [' .$module. ']'); |
| 238 | 233 | return false; |
| 239 | 234 | } |
@@ -259,8 +254,7 @@ discard block |
||
| 259 | 254 | if(file_exists($filePath)){ |
| 260 | 255 | $logger->info('Found library [' . $class . '] in module [' .$module. '], the file path is [' .$filePath. ']'); |
| 261 | 256 | return $filePath; |
| 262 | - } |
|
| 263 | - else{ |
|
| 257 | + } else{ |
|
| 264 | 258 | $logger->info('Library [' . $class . '] does not exist in the module [' .$module. ']'); |
| 265 | 259 | return false; |
| 266 | 260 | } |
@@ -288,8 +282,7 @@ discard block |
||
| 288 | 282 | if(file_exists($filePath)){ |
| 289 | 283 | $logger->info('Found view [' . $view . '] in module [' .$module. '], the file path is [' .$filePath. ']'); |
| 290 | 284 | return $filePath; |
| 291 | - } |
|
| 292 | - else{ |
|
| 285 | + } else{ |
|
| 293 | 286 | $logger->info('View [' . $view . '] does not exist in the module [' .$module. ']'); |
| 294 | 287 | return false; |
| 295 | 288 | } |
@@ -316,8 +309,7 @@ discard block |
||
| 316 | 309 | if(file_exists($filePath)){ |
| 317 | 310 | $logger->info('Found language [' . $language . '] in module [' .$module. '], the file path is [' .$filePath. ']'); |
| 318 | 311 | return $filePath; |
| 319 | - } |
|
| 320 | - else{ |
|
| 312 | + } else{ |
|
| 321 | 313 | $logger->info('Language [' . $language . '] does not exist in the module [' .$module. ']'); |
| 322 | 314 | return false; |
| 323 | 315 | } |
@@ -477,8 +477,7 @@ discard block |
||
| 477 | 477 | if (mkdir($destination_directory, 0775, true)) { |
| 478 | 478 | $this->destination_directory = $destination_directory; |
| 479 | 479 | chdir($destination_directory); |
| 480 | - } |
|
| 481 | - else{ |
|
| 480 | + } else{ |
|
| 482 | 481 | $this->logger->warning('Can not create the upload directory [' .$destination_directory. ']'); |
| 483 | 482 | } |
| 484 | 483 | } |
@@ -630,8 +629,7 @@ discard block |
||
| 630 | 629 | // set original filename if not have a new name |
| 631 | 630 | if (empty($this->filename)) { |
| 632 | 631 | $this->filename = $this->file_array[$this->input]['name']; |
| 633 | - } |
|
| 634 | - else{ |
|
| 632 | + } else{ |
|
| 635 | 633 | // Replace %s for extension in filename |
| 636 | 634 | // Before: /[\w\d]*(.[\d\w]+)$/i |
| 637 | 635 | // After: /^[\s[:alnum:]\-\_\.]*\.([\d\w]+)$/iu |