Completed
Pull Request — master (#149)
by Paul
03:16 queued 14s
created
src/ServiceManager/Factory/RouterListenerFactory.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
 namespace PPI\Framework\ServiceManager\Factory;
12 12
 
13 13
 use PPI\Framework\Router\RouterListener;
14
-use Symfony\Component\Routing\RequestContext;
15 14
 use Zend\ServiceManager\FactoryInterface;
16 15
 use Zend\ServiceManager\ServiceLocatorInterface;
17 16
 
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This file is part of the PPI Framework.
4
- *
5
- * @copyright   Copyright (c) 2011-2013 Paul Dragoonis <[email protected]>
6
- * @license     http://opensource.org/licenses/mit-license.php MIT
7
- *
8
- * @link        http://www.ppi.io
9
- */
3
+     * This file is part of the PPI Framework.
4
+     *
5
+     * @copyright   Copyright (c) 2011-2013 Paul Dragoonis <[email protected]>
6
+     * @license     http://opensource.org/licenses/mit-license.php MIT
7
+     *
8
+     * @link        http://www.ppi.io
9
+     */
10 10
 
11 11
 namespace PPI\Framework\ServiceManager;
12 12
 
Please login to merge, or discard this patch.
src/ServiceManager/Factory/RouterRequestContextFactory.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      *
26 26
      * @param ServiceLocatorInterface $serviceLocator
27 27
      *
28
-     * @return \PPI\Framework\Router\RouterListener
28
+     * @return RequestContext
29 29
      */
30 30
     public function createService(ServiceLocatorInterface $serviceLocator)
31 31
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,6 @@
 block discarded – undo
61 61
         $defaults = $defaults['framework']['router'];
62 62
 
63 63
         return isset($config['framework']['router']) ?
64
-            $this->mergeConfiguration($defaults, $config['framework']['router']) :
65
-            $defaults;
64
+            $this->mergeConfiguration($defaults, $config['framework']['router']) : $defaults;
66 65
     }
67 66
 }
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This file is part of the PPI Framework.
4
- *
5
- * @copyright   Copyright (c) 2011-2013 Paul Dragoonis <[email protected]>
6
- * @license     http://opensource.org/licenses/mit-license.php MIT
7
- *
8
- * @link        http://www.ppi.io
9
- */
3
+     * This file is part of the PPI Framework.
4
+     *
5
+     * @copyright   Copyright (c) 2011-2013 Paul Dragoonis <[email protected]>
6
+     * @license     http://opensource.org/licenses/mit-license.php MIT
7
+     *
8
+     * @link        http://www.ppi.io
9
+     */
10 10
 
11 11
 namespace PPI\Framework\ServiceManager;
12 12
 
Please login to merge, or discard this patch.
src/View/Twig/TwigEngine.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
     /**
71 71
      * Renders a template.
72 72
      *
73
-     * @param mixed $name       A template name
73
+     * @param string $name       A template name
74 74
      * @param array $parameters An array of parameters to pass to the template
75 75
      *
76 76
      * @throws \InvalidArgumentException if the template does not exist
Please login to merge, or discard this patch.
src/AppInterface.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This file is part of the PPI Framework.
4
- *
5
- * @copyright  Copyright (c) 2012-2015 Paul Dragoonis <[email protected]>
6
- * @license    http://opensource.org/licenses/mit-license.php MIT
7
- *
8
- * @link       http://www.ppi.io
9
- */
3
+     * This file is part of the PPI Framework.
4
+     *
5
+     * @copyright  Copyright (c) 2012-2015 Paul Dragoonis <[email protected]>
6
+     * @license    http://opensource.org/licenses/mit-license.php MIT
7
+     *
8
+     * @link       http://www.ppi.io
9
+     */
10 10
 
11 11
 namespace PPI\Framework;
12 12
 
Please login to merge, or discard this patch.
src/Console/Application.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
             $moduleCreateCommand->setTargetModuleDir($config['module_listener_options']['module_paths'][0]);
113 113
 
114 114
             // Enabled templating engines
115
-            if(isset($config['framework']['templating']['engines'])) {
115
+            if (isset($config['framework']['templating']['engines'])) {
116 116
                 $moduleCreateCommand->setEnabledTemplatingEngines($config['framework']['templating']['engines']);
117 117
             }
118 118
 
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This file is part of the PPI Framework.
4
- *
5
- * @copyright  Copyright (c) 2011-2013 Paul Dragoonis <[email protected]>
6
- * @license    http://opensource.org/licenses/mit-license.php MIT
7
- *
8
- * @link       http://www.ppi.io
9
- */
3
+     * This file is part of the PPI Framework.
4
+     *
5
+     * @copyright  Copyright (c) 2011-2013 Paul Dragoonis <[email protected]>
6
+     * @license    http://opensource.org/licenses/mit-license.php MIT
7
+     *
8
+     * @link       http://www.ppi.io
9
+     */
10 10
 
11 11
 namespace PPI\Framework\View;
12 12
 
Please login to merge, or discard this patch.
src/Console/Command/ServiceManagerDebugCommand.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
             $output->write(sprintf('<info>%s</info> ', str_pad($id, $pad['id'])));
125 125
             $output->write(sprintf('%s ', str_pad($line['type'], $pad['type'])));
126 126
             if ('Alias' == $line['type']) {
127
-                $output->write(sprintf('<comment>alias for</comment> <info>%s </info>', str_pad($line['class'], $pad['class']-10)));
127
+                $output->write(sprintf('<comment>alias for</comment> <info>%s </info>', str_pad($line['class'], $pad['class'] - 10)));
128 128
             } else {
129 129
                 $output->write(sprintf('%s ', str_pad($line['class'], $pad['class'])));
130 130
             }
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This file is part of the PPI Framework.
4
- *
5
- * @copyright  Copyright (c) 2011-2013 Paul Dragoonis <[email protected]>
6
- * @license    http://opensource.org/licenses/mit-license.php MIT
7
- *
8
- * @link       http://www.ppi.io
9
- */
3
+     * This file is part of the PPI Framework.
4
+     *
5
+     * @copyright  Copyright (c) 2011-2013 Paul Dragoonis <[email protected]>
6
+     * @license    http://opensource.org/licenses/mit-license.php MIT
7
+     *
8
+     * @link       http://www.ppi.io
9
+     */
10 10
 
11 11
 namespace PPI\Framework\View;
12 12
 
Please login to merge, or discard this patch.
src/Router/ChainRouter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
             $parameters = parent::matchRequest($request);
71 71
             $this->matchedRouteRequest = $request;
72 72
             return $parameters;
73
-        } catch(\Exception $e) {
73
+        } catch (\Exception $e) {
74 74
             throw $e;
75 75
         }
76 76
     }
Please login to merge, or discard this patch.
src/Router/Wrapper/AuraRouterWrapper.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This file is part of the PPI Framework.
4
- *
5
- * @copyright  Copyright (c) 2011-2015 Paul Dragoonis <[email protected]>
6
- * @license    http://opensource.org/licenses/mit-license.php MIT
7
- * @link       http://www.ppi.io
8
- */
3
+     * This file is part of the PPI Framework.
4
+     *
5
+     * @copyright  Copyright (c) 2011-2015 Paul Dragoonis <[email protected]>
6
+     * @license    http://opensource.org/licenses/mit-license.php MIT
7
+     * @link       http://www.ppi.io
8
+     */
9 9
 
10 10
 namespace PPI\Framework\Router\Wrapper;
11 11
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH)
86 86
     {
87 87
         $ret = $this->router->generate($name, $parameters);
88
-        if($ret === false) {
88
+        if ($ret === false) {
89 89
             throw new RouteNotFoundException('Unable to generate route for: ' . $name);
90 90
         }
91 91
         return $ret;
@@ -127,16 +127,16 @@  discard block
 block discarded – undo
127 127
         $routeParams = $matchedRoute->params;
128 128
 
129 129
         // The 'action' key always exists and defaults to the Route Name, so we check accordingly
130
-        if(!isset($routeParams['controller']) && $routeParams['action'] === $matchedRoute->name) {
130
+        if (!isset($routeParams['controller']) && $routeParams['action'] === $matchedRoute->name) {
131 131
             throw new \Exception('Matched the route: ' . $matchedRoute->name . ' but unable to locate
132 132
             any controller/action params to dispatch');
133 133
         }
134 134
 
135 135
         // We need _controller, to that symfony ControllerResolver can pick this up
136
-        if(!isset($routeParams['_controller'])) {
137
-            if(isset($routeParams['controller'])) {
136
+        if (!isset($routeParams['_controller'])) {
137
+            if (isset($routeParams['controller'])) {
138 138
                 $routeParams['_controller'] = $routeParams['controller'];
139
-            } elseif(isset($routeParams['action'])) {
139
+            } elseif (isset($routeParams['action'])) {
140 140
                 $routeParams['_controller'] = $routeParams['action'];
141 141
             } else {
142 142
                 throw new \Exception('Unable to determine the controller from route: ' . $matchedRoute->name);
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
         $routeParams['_route'] = $matchedRoute->name;
147 147
 
148 148
         // If the controller is an Object, and 'action' is defaulted to the route name - we default to __invoke
149
-        if($routeParams['action'] === $matchedRoute->name) {
149
+        if ($routeParams['action'] === $matchedRoute->name) {
150 150
             $routeParams['action'] = '__invoke';
151 151
         }
152 152
 
Please login to merge, or discard this patch.
src/ServiceManager/Config/MonologConfig.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         }
82 82
 
83 83
         $loggerClass = $configs['parameters']['monolog.logger.class'];
84
-        $serviceManager->setFactory('monolog.logger', function ($serviceManager) use ($loggerClass, $handlersToChannels) {
84
+        $serviceManager->setFactory('monolog.logger', function($serviceManager) use ($loggerClass, $handlersToChannels) {
85 85
             $logger = new $loggerClass('app');
86 86
             foreach ($handlersToChannels as $handler => $channels) {
87 87
                 $logger->pushHandler($serviceManager->get($handler));
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         $class            = $parameters[sprintf('monolog.handler.%s.class', $handler['type'])];
106 106
         $handler['level'] = is_int($handler['level']) ? $handler['level'] : constant('Monolog\Logger::' . strtoupper($handler['level']));
107 107
 
108
-        $serviceManager->setFactory($handlerId, function ($serviceManager) use ($class, $handler) {
108
+        $serviceManager->setFactory($handlerId, function($serviceManager) use ($class, $handler) {
109 109
             switch ($handler['type']) {
110 110
             case 'stream':
111 111
                 return new $class($handler['path'], $handler['level'], $handler['bubble']);
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This file is part of the PPI Framework.
4
- *
5
- * @copyright   Copyright (c) 2011-2015 Paul Dragoonis <[email protected]>
6
- * @license     http://opensource.org/licenses/mit-license.php MIT
7
- *
8
- * @link        http://www.ppi.io
9
- */
3
+     * This file is part of the PPI Framework.
4
+     *
5
+     * @copyright   Copyright (c) 2011-2015 Paul Dragoonis <[email protected]>
6
+     * @license     http://opensource.org/licenses/mit-license.php MIT
7
+     *
8
+     * @link        http://www.ppi.io
9
+     */
10 10
 
11 11
 namespace PPI\Framework\ServiceManager;
12 12
 
Please login to merge, or discard this patch.