Completed
Pull Request — master (#145)
by Paul
03:21
created
src/Router/RoutingHelper.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) 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\Router;
12 12
 
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.
src/ServiceManager/Config/ServiceManagerConfig.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             $serviceManager->setShared($name, $value);
134 134
         }
135 135
 
136
-        $serviceManager->addInitializer(function ($instance) use ($serviceManager) {
136
+        $serviceManager->addInitializer(function($instance) use ($serviceManager) {
137 137
             if ($instance instanceof EventManagerAwareInterface) {
138 138
                 if ($instance->getEventManager() instanceof EventManagerInterface) {
139 139
                     $instance->getEventManager()->setSharedManager(
@@ -145,13 +145,13 @@  discard block
 block discarded – undo
145 145
             }
146 146
         });
147 147
 
148
-        $serviceManager->addInitializer(function ($instance) use ($serviceManager) {
148
+        $serviceManager->addInitializer(function($instance) use ($serviceManager) {
149 149
             if ($instance instanceof ServiceManagerAwareInterface) {
150 150
                 $instance->setServiceManager($serviceManager);
151 151
             }
152 152
         });
153 153
 
154
-        $serviceManager->addInitializer(function ($instance) use ($serviceManager) {
154
+        $serviceManager->addInitializer(function($instance) use ($serviceManager) {
155 155
             if ($instance instanceof ServiceLocatorAwareInterface) {
156 156
                 $instance->setServiceLocator($serviceManager);
157 157
             }
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) 2012 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 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\Mustache;
12 12
 
Please login to merge, or discard this patch.
src/ServiceManager/Config/SessionConfig.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
         $config = $serviceManager->get('Config');
47 47
 
48
-        $options =  array_merge(array(
48
+        $options = array_merge(array(
49 49
             'auto_start'        => false,
50 50
             'storage_id'        => 'session.storage.native',
51 51
             'handler_id'        => 'session.handler.native_file',
@@ -67,14 +67,14 @@  discard block
 block discarded – undo
67 67
         }
68 68
 
69 69
         // session handler
70
-        $serviceManager->setFactory('session.handler', function ($serviceManager) use ($options) {
70
+        $serviceManager->setFactory('session.handler', function($serviceManager) use ($options) {
71 71
             $handlerID = $options['handler_id'];
72 72
 
73 73
             return $handlerID === null ? null : $serviceManager->get($handlerID);
74 74
         });
75 75
 
76 76
         // session storage native
77
-        $serviceManager->setFactory('session.storage.native', function ($serviceManager) use ($storageOptions) {
77
+        $serviceManager->setFactory('session.storage.native', function($serviceManager) use ($storageOptions) {
78 78
 
79 79
             // We need to strip out keys with a null value so symfony doesn't try and set things with a blank value
80 80
             $storageOptions = array_filter($storageOptions);
@@ -83,19 +83,19 @@  discard block
 block discarded – undo
83 83
         });
84 84
 
85 85
         // session flash bag
86
-        $serviceManager->setFactory('session.flash_bag', function ($serviceManager) {
86
+        $serviceManager->setFactory('session.flash_bag', function($serviceManager) {
87 87
             return new FlashBag();
88 88
         });
89 89
 
90 90
         // session attribute bag
91
-        $serviceManager->setFactory('session.attribute_bag', function ($serviceManager) {
91
+        $serviceManager->setFactory('session.attribute_bag', function($serviceManager) {
92 92
             return new AttributeBag();
93 93
         });
94 94
 
95 95
         $that = $this;
96 96
 
97 97
         // session handler native file
98
-        $serviceManager->setFactory('session.handler.native_file', function ($serviceManager) use ($that, $storageOptions) {
98
+        $serviceManager->setFactory('session.handler.native_file', function($serviceManager) use ($that, $storageOptions) {
99 99
 
100 100
             // We want absolute paths if we can
101 101
             if (null !== $storageOptions['save_path'] && !$that->isAbsolutePath($storageOptions['save_path'])) {
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         });
113 113
 
114 114
         // session
115
-        $serviceManager->setFactory('session', function ($serviceManager) {
115
+        $serviceManager->setFactory('session', function($serviceManager) {
116 116
 
117 117
             $session = new Session(
118 118
                 $serviceManager->get('session.storage.native'),
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) 2012 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 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\Mustache;
12 12
 
Please login to merge, or discard this patch.
src/ServiceManager/Factory/ConfigFactory.php 2 patches
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,8 +48,7 @@
 block discarded – undo
48 48
         $parametersBag = $serviceLocator->get('ApplicationParameters');
49 49
 
50 50
         $config['parameters'] = isset($config['parameters']) ?
51
-            ArrayUtils::merge($parametersBag->all(), $config['parameters']) :
52
-            $config['parameters'] = $parametersBag->all();
51
+            ArrayUtils::merge($parametersBag->all(), $config['parameters']) : $config['parameters'] = $parametersBag->all();
53 52
 
54 53
         return $parametersBag->resolveArray($config);
55 54
     }
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.
src/ServiceManager/ParameterBag.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
     public function resolveArray(array $data)
81 81
     {
82 82
         $self = $this;
83
-        array_walk_recursive($data, function (&$value, $key) use ($self) {
83
+        array_walk_recursive($data, function(&$value, $key) use ($self) {
84 84
             if (is_string($value)) {
85 85
                 $value = $self->resolveString($value);
86 86
             }
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) 2012 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 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\Mustache;
12 12
 
Please login to merge, or discard this patch.
src/ServiceManager/ServiceManager.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) 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.
src/ServiceManager/ServiceManagerBuilder.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) 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.