Completed
Push — master ( fc8ad1...2dac1f )
by Chauncey
45s
created
src/Charcoal/App/App.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
     {
164 164
         if (!isset($this->routeManager)) {
165 165
             $config = $this->config();
166
-            $routesConfig = (isset($config['routes']) ? $config['routes'] : [] );
166
+            $routesConfig = (isset($config['routes']) ? $config['routes'] : []);
167 167
 
168 168
             $this->routeManager = new RouteManager([
169 169
                 'config' => $routesConfig,
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
         // For now, need to rely on a catch-all...
224 224
         $this->get(
225 225
             '{catchall:.*}',
226
-            function (
226
+            function(
227 227
                 RequestInterface $request,
228 228
                 ResponseInterface $response,
229 229
                 array $args
Please login to merge, or discard this patch.
src/Charcoal/App/Route/RouteManager.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -51,17 +51,17 @@  discard block
 block discarded – undo
51 51
         $routes = $this->config();
52 52
 
53 53
         if (PHP_SAPI == 'cli') {
54
-            $scripts = ( isset($routes['scripts']) ? $routes['scripts'] : [] );
54
+            $scripts = (isset($routes['scripts']) ? $routes['scripts'] : []);
55 55
             foreach ($scripts as $scriptIdent => $scriptConfig) {
56 56
                 $this->setupScript($scriptIdent, $scriptConfig);
57 57
             }
58 58
         } else {
59
-            $templates = ( isset($routes['templates']) ? $routes['templates'] : [] );
59
+            $templates = (isset($routes['templates']) ? $routes['templates'] : []);
60 60
             foreach ($templates as $routeIdent => $templateConfig) {
61 61
                 $this->setupTemplate($routeIdent, $templateConfig);
62 62
             }
63 63
 
64
-            $actions = ( isset($routes['actions']) ? $routes['actions'] : [] );
64
+            $actions = (isset($routes['actions']) ? $routes['actions'] : []);
65 65
             foreach ($actions as $actionIdent => $actionConfig) {
66 66
                 $this->setupAction($actionIdent, $actionConfig);
67 67
             }
@@ -87,12 +87,12 @@  discard block
 block discarded – undo
87 87
 
88 88
         $methods = isset($templateConfig['methods'])
89 89
             ? $templateConfig['methods']
90
-            : [ 'GET' ];
90
+            : ['GET'];
91 91
 
92 92
         $routeHandler = $this->app->map(
93 93
             $methods,
94 94
             $routePattern,
95
-            function (
95
+            function(
96 96
                 RequestInterface $request,
97 97
                 ResponseInterface $response,
98 98
                 array $args = []
@@ -163,12 +163,12 @@  discard block
 block discarded – undo
163 163
 
164 164
         $methods = isset($actionConfig['methods'])
165 165
             ? $actionConfig['methods']
166
-            : [ 'POST' ];
166
+            : ['POST'];
167 167
 
168 168
         $routeHandler = $this->app->map(
169 169
             $methods,
170 170
             $routePattern,
171
-            function (
171
+            function(
172 172
                 RequestInterface $request,
173 173
                 ResponseInterface $response,
174 174
                 array $args = []
@@ -239,12 +239,12 @@  discard block
 block discarded – undo
239 239
 
240 240
         $methods = isset($scriptConfig['methods'])
241 241
             ? $scriptConfig['methods']
242
-            : [ 'GET' ];
242
+            : ['GET'];
243 243
 
244 244
         $routeHandler = $this->app->map(
245 245
             $methods,
246 246
             $routePattern,
247
-            function (
247
+            function(
248 248
                 RequestInterface $request,
249 249
                 ResponseInterface $response,
250 250
                 array $args = []
Please login to merge, or discard this patch.
src/Charcoal/App/Action/AbstractAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
                 break;
122 122
 
123 123
             case self::MODE_EVENT_STREAM:
124
-                $output = new CallbackStream(function () use ($request) {
124
+                $output = new CallbackStream(function() use ($request) {
125 125
                     return $this->results();
126 126
                 });
127 127
 
Please login to merge, or discard this patch.
src/Charcoal/App/Template/AbstractTemplate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
             }
65 65
 
66 66
             $value = str_replace(
67
-                [ 'abstract', 'trait', 'interface', 'template', '\\' ],
67
+                ['abstract', 'trait', 'interface', 'template', '\\'],
68 68
                 '',
69 69
                 $value
70 70
             );
Please login to merge, or discard this patch.
src/Charcoal/App/ServiceProvider/FilesystemServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
          * @param  Container $container A service container.
55 55
          * @return FilesystemConfig
56 56
          */
57
-        $container['filesystem/config'] = function (Container $container) {
57
+        $container['filesystem/config'] = function(Container $container) {
58 58
             $fsConfig = ($container['config']['filesystem'] ?? null);
59 59
             return new FilesystemConfig($fsConfig);
60 60
         };
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
          * @param  Container $container A service container.
64 64
          * @return MountManager
65 65
          */
66
-        $container['filesystem/manager'] = function () {
66
+        $container['filesystem/manager'] = function() {
67 67
             return new MountManager();
68 68
         };
69 69
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
          * @param  Container $container A service container.
72 72
          * @return array<string, Filesystem>
73 73
          */
74
-        $container['filesystems'] = function (Container $container) {
74
+        $container['filesystems'] = function(Container $container) {
75 75
             $filesystemConfig = $container['filesystem/config'];
76 76
             $filesystems = new Container();
77 77
 
Please login to merge, or discard this patch.
src/Charcoal/App/ServiceProvider/ScriptServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
          * @param  Container $container A service container.
54 54
          * @return \Charcoal\Factory\FactoryInterface
55 55
          */
56
-        $container['script/factory'] = function (Container $container) {
56
+        $container['script/factory'] = function(Container $container) {
57 57
             return new Factory([
58 58
                 'base_class'       => ScriptInterface::class,
59 59
                 'resolver_options' => [
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
          * @param  Container $container A service container.
82 82
          * @return \League\CLImate\Util\Reader\ReaderInterface|null
83 83
          */
84
-        $container['script/climate/reader'] = function () {
84
+        $container['script/climate/reader'] = function() {
85 85
             return null;
86 86
         };
87 87
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
          * @param  Container $container A service container.
90 90
          * @return CLImate
91 91
          */
92
-        $container['script/climate'] = function () {
92
+        $container['script/climate'] = function() {
93 93
             $climate = new CLImate();
94 94
             return $climate;
95 95
         };
Please login to merge, or discard this patch.
src/Charcoal/App/ServiceProvider/LoggerServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
          * @param  Container $container A service container.
55 55
          * @return LoggerConfig
56 56
          */
57
-        $container['logger/config'] = function (Container $container) {
57
+        $container['logger/config'] = function(Container $container) {
58 58
             $loggerConfig = ($container['config']['logger'] ?? null);
59 59
             return new LoggerConfig($loggerConfig);
60 60
         };
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
          * @param  Container $container A service container.
64 64
          * @return StreamHandler|null
65 65
          */
66
-        $container['logger/handler/stream'] = function (Container $container) {
66
+        $container['logger/handler/stream'] = function(Container $container) {
67 67
             $loggerConfig  = $container['logger/config'];
68 68
             $handlerConfig = $loggerConfig['handlers.stream'];
69 69
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
          * @param  Container $container A service container.
80 80
          * @return BrowserConsoleHandler|null
81 81
          */
82
-        $container['logger/handler/browser-console'] = function (Container $container) {
82
+        $container['logger/handler/browser-console'] = function(Container $container) {
83 83
             $loggerConfig  = $container['logger/config'];
84 84
             $handlerConfig = $loggerConfig['handlers.console'];
85 85
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
          * @param  Container $container A service container.
98 98
          * @return LoggerInterface
99 99
          */
100
-        $container['logger'] = function (Container $container) {
100
+        $container['logger'] = function(Container $container) {
101 101
             $loggerConfig = $container['logger/config'];
102 102
 
103 103
             if ($loggerConfig['active'] !== true) {
Please login to merge, or discard this patch.
src/Charcoal/App/Script/AbstractScript.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -463,7 +463,7 @@
 block discarded – undo
463 463
             $accept = false;
464 464
         }
465 465
 
466
-        if (!in_array($type, [ 'confirm', 'checkboxes', 'radio' ])) {
466
+        if (!in_array($type, ['confirm', 'checkboxes', 'radio'])) {
467 467
             if (isset($arg['defaultValue'])) {
468 468
                 $default = $arg['defaultValue'];
469 469
 
Please login to merge, or discard this patch.
src/Charcoal/App/ServiceProvider/DatabaseServiceProvider.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
          * @param  Container $container A service container.
43 43
          * @return Container<string, DatabaseConfig> A map of database configsets.
44 44
          */
45
-        $container['databases/config'] = function (Container $container) {
45
+        $container['databases/config'] = function(Container $container) {
46 46
             $databases = ($container['config']['databases'] ?? []);
47 47
 
48 48
             $configs = new Container();
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
                 /**
51 51
                  * @return DatabaseConfig
52 52
                  */
53
-                $configs[$dbIdent] = function () use ($dbOptions) {
53
+                $configs[$dbIdent] = function() use ($dbOptions) {
54 54
                     return new DatabaseConfig($dbOptions);
55 55
                 };
56 56
             }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
          * @param  Container $container A service container.
63 63
          * @return Container<string, PDO> A map of database handlers.
64 64
          */
65
-        $container['databases'] = function (Container $container) {
65
+        $container['databases'] = function(Container $container) {
66 66
             $databases = ($container['config']['databases'] ?? []);
67 67
 
68 68
             $dbs = new Container();
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                 /**
71 71
                  * @return PDO
72 72
                  */
73
-                $dbs[$dbIdent] = function () use ($dbIdent, $container) {
73
+                $dbs[$dbIdent] = function() use ($dbIdent, $container) {
74 74
                     $dbConfig = $container['databases/config'][$dbIdent];
75 75
 
76 76
                     $type = $dbConfig['type'];
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
          * @throws Exception If the database configset is invalid.
116 116
          * @return DatabaseConfig
117 117
          */
118
-        $container['database/config'] = function (Container $container) {
118
+        $container['database/config'] = function(Container $container) {
119 119
             $dbIdent   = $container['config']['default_database'] ?? 'default';
120 120
             $dbConfigs = $container['databases/config'];
121 121
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
          * @throws Exception If the database configuration is invalid.
136 136
          * @return PDO
137 137
          */
138
-        $container['database'] = function (Container $container) {
138
+        $container['database'] = function(Container $container) {
139 139
             $dbIdent   = $container['config']['default_database'] ?? 'default';
140 140
             $databases = $container['databases'];
141 141
 
Please login to merge, or discard this patch.