@@ -134,20 +134,20 @@ |
||
134 | 134 | $parseUrl = parse_url($node->childNodes->first()->getAttributeHref()); |
135 | 135 | $parseUrlQuery = []; |
136 | 136 | |
137 | - if (isset($parseUrl[ 'query' ])) { |
|
138 | - parse_str($parseUrl[ 'query' ], $parseUrlQuery); |
|
137 | + if (isset($parseUrl['query'])) { |
|
138 | + parse_str($parseUrl['query'], $parseUrlQuery); |
|
139 | 139 | } |
140 | 140 | |
141 | - if (isset($parseUrlQuery[ 'page' ])) { |
|
142 | - if (input()->get('page') === $parseUrlQuery[ 'page' ]) { |
|
141 | + if (isset($parseUrlQuery['page'])) { |
|
142 | + if (input()->get('page') === $parseUrlQuery['page']) { |
|
143 | 143 | $node->attributes->addAttributeClass('active'); |
144 | 144 | $node->childNodes->first()->attributes->addAttributeClass('active'); |
145 | 145 | } |
146 | 146 | } else { |
147 | 147 | $hrefUriSegments = []; |
148 | 148 | |
149 | - if (isset($parseUrl[ 'path' ])) { |
|
150 | - $hrefUriSegments = (new Uri\Segments($parseUrl[ 'path' ]))->getArrayCopy(); |
|
149 | + if (isset($parseUrl['path'])) { |
|
150 | + $hrefUriSegments = (new Uri\Segments($parseUrl['path']))->getArrayCopy(); |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | $currentUriSegments = server_request()->getUri()->segments->getArrayCopy(); |
@@ -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); |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | public function handleAppRequest(FrameworkModuleDataStructure $app) |
304 | 304 | { |
305 | 305 | // Find App module |
306 | - foreach(['modules', 'plugins'] as $additionalSegment) { |
|
306 | + foreach (['modules', 'plugins'] as $additionalSegment) { |
|
307 | 307 | if (false !== ($module = modules()->getModule([ |
308 | 308 | $app->getParameter(), |
309 | 309 | $additionalSegment, |
@@ -334,11 +334,11 @@ discard block |
||
334 | 334 | $uriRoutedSegments = array_diff($uriSegments, |
335 | 335 | array_slice($uriSegments, ($numOfUriSegments - $i))); |
336 | 336 | |
337 | - if(count($uriRoutedSegments)) { |
|
338 | - if($module instanceof FrameworkModuleDataStructure) { |
|
337 | + if (count($uriRoutedSegments)) { |
|
338 | + if ($module instanceof FrameworkModuleDataStructure) { |
|
339 | 339 | $moduleSegments = $module->getSegments(); |
340 | 340 | |
341 | - if(count($moduleSegments)) { |
|
341 | + if (count($moduleSegments)) { |
|
342 | 342 | $uriRoutedSegments = array_merge($moduleSegments, $uriRoutedSegments); |
343 | 343 | } |
344 | 344 | } |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | if (class_exists($controllerClassName)) { |
431 | 431 | $this->addresses->any( |
432 | 432 | '/', |
433 | - function () use ($controllerClassName) { |
|
433 | + function() use ($controllerClassName) { |
|
434 | 434 | return new $controllerClassName(); |
435 | 435 | } |
436 | 436 | ); |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | if (class_exists($controllerClassName)) { |
446 | 446 | $this->addresses->any( |
447 | 447 | '/', |
448 | - function () use ($controllerClassName) { |
|
448 | + function() use ($controllerClassName) { |
|
449 | 449 | return new $controllerClassName(); |
450 | 450 | } |
451 | 451 | ); |
@@ -497,8 +497,8 @@ discard block |
||
497 | 497 | ); |
498 | 498 | } elseif (preg_match("/([a-zA-Z0-9\\\]+)(@)([a-zA-Z0-9\\\]+)/", $closure, $matches)) { |
499 | 499 | $this->setController( |
500 | - (new KernelControllerDataStructure($matches[ 1 ])) |
|
501 | - ->setRequestMethod($matches[ 3 ]), |
|
500 | + (new KernelControllerDataStructure($matches[1])) |
|
501 | + ->setRequestMethod($matches[3]), |
|
502 | 502 | $uriSegments |
503 | 503 | ); |
504 | 504 | } elseif (presenter()->theme->use === true) { |