Completed
Push — master ( 701f1f...fb5414 )
by Vítor
02:37
created
src/Controller/Http/IndexController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     public function indexAction()
22 22
     {
23 23
         $this->layout(Module::DEFAULT_LAYOUT);
24
-        $view = new ViewModel([]);
24
+        $view = new ViewModel([ ]);
25 25
         $view->setTemplate(Package::FQPN . '/index/index');
26 26
 
27 27
         return $view;
Please login to merge, or discard this patch.
src/Util/Routing/RouteCollectionBuilder.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 
41 41
     /**
42 42
      * @param FlatRouteCollection $routeCollection
43
-     * @param array               $routesConfig
43
+     * @param RouteInterface               $routesConfig
44 44
      * @param array               $parentRoutesConfig
45 45
      */
46 46
     private function processRoutes(FlatRouteCollection $routeCollection, array $routesConfig, array $parentRoutesConfig = null)
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      *
26 26
      * @param array $routes
27 27
      */
28
-    public function __construct(array $routes = [])
28
+    public function __construct(array $routes = [ ])
29 29
     {
30 30
         $this->routes = $routes;
31 31
     }
@@ -49,14 +49,14 @@  discard block
 block discarded – undo
49 49
     {
50 50
         foreach (array_keys($routesConfig) as $k) {
51 51
             $childRoutes = null;
52
-            if (isset($routesConfig[$k]['child_routes']) && !empty($routesConfig[$k]['child_routes'])) {
53
-                $childRoutes = $routesConfig[$k]['child_routes'];
54
-                unset($routesConfig[$k]['child_routes']);
52
+            if (isset($routesConfig[ $k ][ 'child_routes' ]) && !empty($routesConfig[ $k ][ 'child_routes' ])) {
53
+                $childRoutes = $routesConfig[ $k ][ 'child_routes' ];
54
+                unset($routesConfig[ $k ][ 'child_routes' ]);
55 55
             }
56 56
 
57
-            $routesConfig[$k]['name'] = $k;
58
-            $route = $this->processRoute($routesConfig[$k], $parentRoute);
59
-            if (!isset($routesConfig[$k]['may_terminate']) || false !== $routesConfig[$k]['may_terminate']) {
57
+            $routesConfig[ $k ][ 'name' ] = $k;
58
+            $route = $this->processRoute($routesConfig[ $k ], $parentRoute);
59
+            if (!isset($routesConfig[ $k ][ 'may_terminate' ]) || false !== $routesConfig[ $k ][ 'may_terminate' ]) {
60 60
                 $routeCollection->addRoute($route);
61 61
             }
62 62
 
@@ -76,12 +76,12 @@  discard block
 block discarded – undo
76 76
      */
77 77
     private function processRoute(array $routeConfig, Route $parentRoute = null)
78 78
     {
79
-        $name = $routeConfig['name'];
80
-        $url = isset($routeConfig['options']['route']) ? $routeConfig['options']['route'] : '';
81
-        $controller = isset($routeConfig['options']['defaults']['controller'])
82
-            ? $routeConfig['options']['defaults']['controller'] : null;
83
-        $action = isset($routeConfig['options']['defaults']['action'])
84
-            ? $routeConfig['options']['defaults']['action'] : null;
79
+        $name = $routeConfig[ 'name' ];
80
+        $url = isset($routeConfig[ 'options' ][ 'route' ]) ? $routeConfig[ 'options' ][ 'route' ] : '';
81
+        $controller = isset($routeConfig[ 'options' ][ 'defaults' ][ 'controller' ])
82
+            ? $routeConfig[ 'options' ][ 'defaults' ][ 'controller' ] : null;
83
+        $action = isset($routeConfig[ 'options' ][ 'defaults' ][ 'action' ])
84
+            ? $routeConfig[ 'options' ][ 'defaults' ][ 'action' ] : null;
85 85
 
86 86
         if (null !== $parentRoute) {
87 87
             $name = $parentRoute->getName() . '/' . $name;
Please login to merge, or discard this patch.
src/Factory/Util/Routing/RouteCollectionFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     {
25 25
         /** @var array $config */
26 26
         $config = $serviceLocator->get('config');
27
-        $config = isset($config['router']['routes']) ? $config['router']['routes'] : [];
27
+        $config = isset($config[ 'router' ][ 'routes' ]) ? $config[ 'router' ][ 'routes' ] : [ ];
28 28
 
29 29
         /** @var RouteInterface $router */
30 30
         $router = $serviceLocator->get('router');
Please login to merge, or discard this patch.
src/Module.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function getModuleDependencies()
34 34
     {
35
-        return ['AssetManager'];
35
+        return [ 'AssetManager' ];
36 36
     }
37 37
 
38 38
     /**
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         }
58 58
 
59 59
         $currentRouteName = $this->getCurrentRouteName($e->getApplication()->getServiceManager());
60
-        $e->getViewModel()->setVariables(['__currentRouteName' => $currentRouteName]);
60
+        $e->getViewModel()->setVariables([ '__currentRouteName' => $currentRouteName ]);
61 61
     }
62 62
 
63 63
     /**
Please login to merge, or discard this patch.
src/Util/Routing/FlatRouteCollection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      *
21 21
      * @param array $routes
22 22
      */
23
-    public function __construct(array $routes = [])
23
+    public function __construct(array $routes = [ ])
24 24
     {
25 25
         $this->routes = $routes;
26 26
     }
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function addRoute(Route $route)
32 32
     {
33
-        $this->routes[$route->getName()] = $route;
33
+        $this->routes[ $route->getName() ] = $route;
34 34
     }
35 35
 
36 36
     /**
Please login to merge, or discard this patch.