Completed
Push — master ( c0ab9f...7be361 )
by Mathieu
02:16
created
src/Charcoal/App/Route/TemplateRouteConfig.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@
 block discarded – undo
177 177
     public function setRedirectMode($redirectMode)
178 178
     {
179 179
         $redirectMode = (int)$redirectMode;
180
-        if ($redirectMode < 300 || $redirectMode  >= 400) {
180
+        if ($redirectMode < 300 || $redirectMode >= 400) {
181 181
             throw new InvalidArgumentException(
182 182
                 'Invalid HTTP status for redirect mode'
183 183
             );
Please login to merge, or discard this patch.
src/Charcoal/App/Module/AbstractModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
     {
119 119
         if (!isset($this->routeManager)) {
120 120
             $config = $this->config();
121
-            $routes = (isset($config['routes']) ? $config['routes'] : [] );
121
+            $routes = (isset($config['routes']) ? $config['routes'] : []);
122 122
 
123 123
             $this->routeManager = new RouteManager([
124 124
                 'config' => $routes,
Please login to merge, or discard this patch.
src/Charcoal/App/CallableResolverAwareTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -87,22 +87,22 @@
 block discarded – undo
87 87
                 $method = $matches[2];
88 88
 
89 89
                 if (is_object($context)) {
90
-                    $callable = [ $context, $method ];
90
+                    $callable = [$context, $method];
91 91
                 }
92 92
 
93 93
                 if (!is_callable($callable)) {
94 94
                     switch ($class) {
95 95
                         case '':
96 96
                         case 'self':
97
-                            $callable = [ $this, $method ];
97
+                            $callable = [$this, $method];
98 98
                             break;
99 99
 
100 100
                         case 'static':
101
-                            $callable = [ static::class, $method ];
101
+                            $callable = [static::class, $method];
102 102
                             break;
103 103
 
104 104
                         case 'parent':
105
-                            $callable = [ $this, 'parent::'.$method ];
105
+                            $callable = [$this, 'parent::'.$method];
106 106
                             break;
107 107
                     }
108 108
                 }
Please login to merge, or discard this patch.
src/Charcoal/App/Script/ArgScriptTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
         foreach ($params as $key => $param) {
55 55
             $setter = $this->setter($key);
56 56
 
57
-            if (!is_callable([ $this, $setter ])) {
57
+            if (!is_callable([$this, $setter])) {
58 58
                 continue;
59 59
             }
60 60
 
Please login to merge, or discard this patch.
src/Charcoal/App/Route/RouteConfig.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      *
41 41
      * @var string[]
42 42
      */
43
-    private $methods = [ 'GET' ];
43
+    private $methods = ['GET'];
44 44
 
45 45
     /**
46 46
      * Response controller classname
Please login to merge, or discard this patch.
src/Charcoal/App/Script/PathScriptTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
     public function processMultiplePaths($paths)
39 39
     {
40 40
         $paths = $this->parseAsArray($paths);
41
-        $paths = array_map([ $this, 'filterPath' ], $paths);
42
-        $paths = array_filter($paths, [ $this, 'pathExists' ]);
41
+        $paths = array_map([$this, 'filterPath'], $paths);
42
+        $paths = array_filter($paths, [$this, 'pathExists']);
43 43
 
44 44
         if ($paths === false) {
45 45
             throw new InvalidArgumentException('Received invalid paths.');
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 
162 162
         $depth = 1;
163 163
         $files = glob($pattern, $flags);
164
-        foreach (glob(dirname($pattern).'/*', (GLOB_ONLYDIR|GLOB_NOSORT)) as $dir) {
164
+        foreach (glob(dirname($pattern).'/*', (GLOB_ONLYDIR | GLOB_NOSORT)) as $dir) {
165 165
             $files = array_merge($files, $this->globRecursive($dir.'/'.basename($pattern), $flags));
166 166
             $depth++;
167 167
             if ($maxDepth > 0 && $depth >= $maxDepth) {
Please login to merge, or discard this patch.
src/Charcoal/App/AppContainer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
         * @return Factory
64 64
         */
65 65
         if (!isset($this['provider/factory'])) {
66
-            $this['provider/factory'] = function () {
66
+            $this['provider/factory'] = function() {
67 67
                 return new Factory([
68 68
                     'base_class'       => ServiceProviderInterface::class,
69 69
                     'resolver_options' => [
Please login to merge, or discard this patch.
src/Charcoal/App/Handler/AbstractError.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -220,7 +220,7 @@
 block discarded – undo
220 220
      */
221 221
     protected function renderJsonMessage($throwable)
222 222
     {
223
-        $json  = [
223
+        $json = [
224 224
             'message' => $this->getSummary(),
225 225
         ];
226 226
 
Please login to merge, or discard this patch.
src/Charcoal/App/ServiceProvider/LoggerServiceProvider.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
          * @param  Container $container A container instance.
55 55
          * @return LoggerConfig
56 56
          */
57
-        $container['logger/config'] = function (Container $container) {
57
+        $container['logger/config'] = function(Container $container) {
58 58
             $appConfig    = isset($container['config']) ? $container['config'] : [];
59 59
             $loggerConfig = isset($appConfig['logger']) ? $appConfig['logger'] : null;
60 60
             return new LoggerConfig($loggerConfig);
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         /**
64 64
          * @return FactoryInterface
65 65
          */
66
-        $container['logger/processor/factory'] = function () {
66
+        $container['logger/processor/factory'] = function() {
67 67
             return new Factory([
68 68
                 'map' => [
69 69
                     'memory-usage' => MemoryUsageProcessor::class,
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
          * @param  Container $container A container instance.
77 77
          * @return StreamHandler|null
78 78
          */
79
-        $container['logger/handler/stream'] = function (Container $container) {
79
+        $container['logger/handler/stream'] = function(Container $container) {
80 80
             $loggerConfig  = $container['logger/config'];
81 81
             $handlerConfig = $loggerConfig['handlers.stream'];
82 82
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
          * @param  Container $container A container instance.
93 93
          * @return BrowserConsoleHandler|null
94 94
          */
95
-        $container['logger/handler/browser-console'] = function (Container $container) {
95
+        $container['logger/handler/browser-console'] = function(Container $container) {
96 96
             $loggerConfig  = $container['logger/config'];
97 97
             $handlerConfig = $loggerConfig['handlers.console'];
98 98
 
@@ -108,14 +108,14 @@  discard block
 block discarded – undo
108 108
          * @param  Container $container A container instance.
109 109
          * @return Container Collection of defined record handlers, in a service container.
110 110
          */
111
-        $container['logger/handlers'] = function (Container $container) {
111
+        $container['logger/handlers'] = function(Container $container) {
112 112
             $loggerConfig   = $container['logger/config'];
113 113
             $handlersConfig = $loggerConfig['handlers'];
114 114
             $handlerFactory = $container['logger/handler/factory'];
115 115
 
116 116
             $handlers = new Container();
117 117
             foreach ($handlersConfig as $handler) {
118
-                $handlers[$handler['type']] = function () use ($handler, $handlerFactory) {
118
+                $handlers[$handler['type']] = function() use ($handler, $handlerFactory) {
119 119
                     $type    = $handler['type'];
120 120
                     $handler = $handlerFactory->create($type);
121 121
                     return $handler;
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
          * @param  Container $container A container instance.
132 132
          * @return LoggerInterface
133 133
          */
134
-        $container['logger'] = function (Container $container) {
134
+        $container['logger'] = function(Container $container) {
135 135
             $loggerConfig = $container['logger/config'];
136 136
 
137 137
             if ($loggerConfig['active'] !== true) {
Please login to merge, or discard this patch.