@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $this->handleExtensionRequest(); |
| 50 | 50 | } else { |
| 51 | 51 | $uriPath = urldecode( |
| 52 | - parse_url($_SERVER[ 'REQUEST_URI' ], PHP_URL_PATH) |
|
| 52 | + parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) |
|
| 53 | 53 | ); |
| 54 | 54 | |
| 55 | 55 | $uriPathParts = explode('public/', $uriPath); |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | public function handleAppRequest(FrameworkModuleDataStructure $app) |
| 305 | 305 | { |
| 306 | 306 | // Find App module |
| 307 | - foreach(['modules', 'plugins'] as $additionalSegment) { |
|
| 307 | + foreach (['modules', 'plugins'] as $additionalSegment) { |
|
| 308 | 308 | if (false !== ($module = modules()->getModule([ |
| 309 | 309 | $app->getParameter(), |
| 310 | 310 | $additionalSegment, |
@@ -335,11 +335,11 @@ discard block |
||
| 335 | 335 | $uriRoutedSegments = array_diff($uriSegments, |
| 336 | 336 | array_slice($uriSegments, ($numOfUriSegments - $i))); |
| 337 | 337 | |
| 338 | - if(count($uriRoutedSegments)) { |
|
| 339 | - if($module instanceof FrameworkModuleDataStructure) { |
|
| 338 | + if (count($uriRoutedSegments)) { |
|
| 339 | + if ($module instanceof FrameworkModuleDataStructure) { |
|
| 340 | 340 | $moduleSegments = $module->getSegments(); |
| 341 | 341 | |
| 342 | - if(count($moduleSegments)) { |
|
| 342 | + if (count($moduleSegments)) { |
|
| 343 | 343 | $uriRoutedSegments = array_merge($moduleSegments, $uriRoutedSegments); |
| 344 | 344 | } |
| 345 | 345 | } |
@@ -431,7 +431,7 @@ discard block |
||
| 431 | 431 | if (class_exists($controllerClassName)) { |
| 432 | 432 | $this->addresses->any( |
| 433 | 433 | '/', |
| 434 | - function () use ($controllerClassName) { |
|
| 434 | + function() use ($controllerClassName) { |
|
| 435 | 435 | return new $controllerClassName(); |
| 436 | 436 | } |
| 437 | 437 | ); |
@@ -446,7 +446,7 @@ discard block |
||
| 446 | 446 | if (class_exists($controllerClassName)) { |
| 447 | 447 | $this->addresses->any( |
| 448 | 448 | '/', |
| 449 | - function () use ($controllerClassName) { |
|
| 449 | + function() use ($controllerClassName) { |
|
| 450 | 450 | return new $controllerClassName(); |
| 451 | 451 | } |
| 452 | 452 | ); |
@@ -498,12 +498,12 @@ discard block |
||
| 498 | 498 | ); |
| 499 | 499 | } elseif (preg_match("/([a-zA-Z0-9\\\]+)(@)([a-zA-Z0-9\\\]+)/", $closure, $matches)) { |
| 500 | 500 | $this->setController( |
| 501 | - (new KernelControllerDataStructure($matches[ 1 ])) |
|
| 502 | - ->setRequestMethod($matches[ 3 ]), |
|
| 501 | + (new KernelControllerDataStructure($matches[1])) |
|
| 502 | + ->setRequestMethod($matches[3]), |
|
| 503 | 503 | $uriSegments |
| 504 | 504 | ); |
| 505 | 505 | } elseif ($theme = presenter()->theme) { |
| 506 | - if($theme->use === true) { |
|
| 506 | + if ($theme->use === true) { |
|
| 507 | 507 | if ( ! presenter()->partials->offsetExists('content') && $closure !== '') { |
| 508 | 508 | presenter()->partials->offsetSet('content', $closure); |
| 509 | 509 | } |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | ); |
| 74 | 74 | |
| 75 | 75 | if ($this->config->offsetExists('extensions')) { |
| 76 | - $this->setFileExtensions($this->config[ 'extensions' ]); |
|
| 76 | + $this->setFileExtensions($this->config['extensions']); |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | $this->document = new Html\Document(); |
@@ -89,13 +89,13 @@ discard block |
||
| 89 | 89 | */ |
| 90 | 90 | public function &__get($property) |
| 91 | 91 | { |
| 92 | - $get[ $property ] = false; |
|
| 92 | + $get[$property] = false; |
|
| 93 | 93 | |
| 94 | 94 | if (property_exists($this, $property)) { |
| 95 | 95 | return $this->{$property}; |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | - return $get[ $property ]; |
|
| 98 | + return $get[$property]; |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | // ------------------------------------------------------------------------ |
@@ -218,8 +218,8 @@ discard block |
||
| 218 | 218 | $error = new ErrorException( |
| 219 | 219 | 'E_VIEW_NOT_FOUND', |
| 220 | 220 | 0, |
| 221 | - @$backtrace[ 0 ][ 'file' ], |
|
| 222 | - @$backtrace[ 0 ][ 'line' ], |
|
| 221 | + @$backtrace[0]['file'], |
|
| 222 | + @$backtrace[0]['line'], |
|
| 223 | 223 | [trim($filename)] |
| 224 | 224 | ); |
| 225 | 225 | |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | $viewsDirectories = array_reverse($viewsDirectories); |
| 308 | 308 | |
| 309 | 309 | $controllerSubDir = null; |
| 310 | - if($controller = services('controller')) { |
|
| 310 | + if ($controller = services('controller')) { |
|
| 311 | 311 | $controllerSubDir = services('controller')->getParameter() . DIRECTORY_SEPARATOR; |
| 312 | 312 | } |
| 313 | 313 | |
@@ -738,12 +738,12 @@ discard block |
||
| 738 | 738 | $htmlOutput = $this->document->saveHTML(); |
| 739 | 739 | |
| 740 | 740 | // Uglify Output |
| 741 | - if ($this->config->output[ 'uglify' ] === true) { |
|
| 741 | + if ($this->config->output['uglify'] === true) { |
|
| 742 | 742 | $htmlOutput = preg_replace( |
| 743 | 743 | [ |
| 744 | - '/\>[^\S ]+/s', // strip whitespaces after tags, except space |
|
| 745 | - '/[^\S ]+\</s', // strip whitespaces before tags, except space |
|
| 746 | - '/(\s)+/s', // shorten multiple whitespace sequences |
|
| 744 | + '/\>[^\S ]+/s', // strip whitespaces after tags, except space |
|
| 745 | + '/[^\S ]+\</s', // strip whitespaces before tags, except space |
|
| 746 | + '/(\s)+/s', // shorten multiple whitespace sequences |
|
| 747 | 747 | '/<!--(.|\s)*?-->/', // Remove HTML comments |
| 748 | 748 | '/<!--(.*)-->/Uis', |
| 749 | 749 | "/[[:blank:]]+/", |
@@ -760,7 +760,7 @@ discard block |
||
| 760 | 760 | } |
| 761 | 761 | |
| 762 | 762 | // Beautify Output |
| 763 | - if ($this->config->output[ 'beautify' ] === true) { |
|
| 763 | + if ($this->config->output['beautify'] === true) { |
|
| 764 | 764 | $beautifier = new Html\Dom\Beautifier(); |
| 765 | 765 | $htmlOutput = $beautifier->format($htmlOutput); |
| 766 | 766 | } |