Completed
Push — master ( 93d1cc...438c17 )
by
unknown
23:12
created
src/Charcoal/Attachment/Object/Container.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
         callable $after = null
67 67
     ) {
68 68
         $attachables = $this->attachableObjects();
69
-        $attachments = call_user_func_array([ $this, 'getAttachments' ], func_get_args());
69
+        $attachments = call_user_func_array([$this, 'getAttachments'], func_get_args());
70 70
 
71 71
         foreach ($attachments as $attachment) {
72 72
             if (isset($attachables[$attachment->objType()])) {
Please login to merge, or discard this patch.
tests/Charcoal/ContainerProvider.php 2 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@  discard block
 block discarded – undo
11 11
 use Psr\Log\NullLogger;
12 12
 
13 13
 // From 'cache/void-adapter' (PSR-6)
14
-use Cache\Adapter\Void\VoidCachePool;
15 14
 
16 15
 // From 'tedivm/stash' (PSR-6)
17 16
 use Stash\Pool;
@@ -47,13 +46,11 @@  discard block
 block discarded – undo
47 46
 
48 47
 // From 'charcoal-ui'
49 48
 use Charcoal\Ui\Dashboard\DashboardBuilder;
50
-use Charcoal\Ui\Dashboard\DashboardInterface;
51 49
 use Charcoal\Ui\Layout\LayoutBuilder;
52 50
 use Charcoal\Ui\Layout\LayoutFactory;
53 51
 
54 52
 // From 'charcoal-email'
55 53
 use Charcoal\Email\Email;
56
-use Charcoal\Email\EmailConfig;
57 54
 
58 55
 // From 'charcoal-view'
59 56
 use Charcoal\View\GenericView;
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      */
109 109
     public function registerBaseUrl(Container $container)
110 110
     {
111
-        $container['base-url'] = function (Container $container) {
111
+        $container['base-url'] = function(Container $container) {
112 112
             return '';
113 113
         };
114 114
     }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      */
122 122
     public function registerConfig(Container $container)
123 123
     {
124
-        $container['config'] = function (Container $container) {
124
+        $container['config'] = function(Container $container) {
125 125
             return new AppConfig([
126 126
                 'base_path'  => realpath(__DIR__.'/../../..'),
127 127
                 'apis'       => [
@@ -146,14 +146,14 @@  discard block
 block discarded – undo
146 146
     {
147 147
         $this->registerConfig($container);
148 148
 
149
-        $container['admin/config'] = function (Container $container) {
149
+        $container['admin/config'] = function(Container $container) {
150 150
             return new AdminConfig();
151 151
         };
152 152
     }
153 153
 
154 154
     public function registerLayoutFactory(Container $container)
155 155
     {
156
-        $container['layout/factory'] = function (Container $container) {
156
+        $container['layout/factory'] = function(Container $container) {
157 157
 
158 158
             $layoutFactory = new LayoutFactory();
159 159
             return $layoutFactory;
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
     {
165 165
         $this->registerLayoutFactory($container);
166 166
 
167
-        $container['layout/builder'] = function (Container $container) {
167
+        $container['layout/builder'] = function(Container $container) {
168 168
             $layoutFactory = $container['layout/factory'];
169 169
             $layoutBuilder = new LayoutBuilder($layoutFactory, $container);
170 170
             return $layoutBuilder;
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
         $this->registerWidgetBuilder($container);
178 178
         $this->registerLayoutBuilder($container);
179 179
 
180
-        $container['dashboard/factory'] = function (Container $container) {
180
+        $container['dashboard/factory'] = function(Container $container) {
181 181
             return new Factory([
182 182
                 'arguments'          => [[
183 183
                     'container'      => $container,
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
     {
197 197
         $this->registerDashboardFactory($container);
198 198
 
199
-        $container['dashboard/builder'] = function (Container $container) {
199
+        $container['dashboard/builder'] = function(Container $container) {
200 200
             $dashboardFactory = $container['dashboard/factory'];
201 201
             $dashboardBuilder = new DashboardBuilder($dashboardFactory, $container);
202 202
             return $dashboardBuilder;
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
     {
208 208
         $this->registerLogger($container);
209 209
 
210
-        $container['widget/factory'] = function (Container $container) {
210
+        $container['widget/factory'] = function(Container $container) {
211 211
             return new Factory([
212 212
                 'resolver_options' => [
213 213
                     'suffix' => 'Widget'
@@ -224,13 +224,13 @@  discard block
 block discarded – undo
224 224
     {
225 225
         $this->registerWidgetFactory($container);
226 226
 
227
-        $container['widget/builder'] = function (Container $container) {
227
+        $container['widget/builder'] = function(Container $container) {
228 228
             return new WidgetBuilder($container['widget/factory'], $container);
229 229
         };
230 230
     }
231 231
     public function registerClimate(Container $container)
232 232
     {
233
-        $container['climate/system'] = function (Container $container) {
233
+        $container['climate/system'] = function(Container $container) {
234 234
             $system = Mockery::mock(Linux::class);
235 235
             $system->shouldReceive('hasAnsiSupport')->andReturn(true);
236 236
             $system->shouldReceive('width')->andReturn(80);
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
             return $system;
239 239
         };
240 240
 
241
-        $container['climate/output'] = function (Container $container) {
241
+        $container['climate/output'] = function(Container $container) {
242 242
             $output = Mockery::mock(Output::class);
243 243
             $output->shouldReceive('persist')->andReturn($output);
244 244
             $output->shouldReceive('sameLine')->andReturn($output);
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
             return $output;
248 248
         };
249 249
 
250
-        $container['climate/reader'] = function (Container $container) {
250
+        $container['climate/reader'] = function(Container $container) {
251 251
             $reader = Mockery::mock(Stdin::class);
252 252
             $reader->shouldReceive('line')->andReturn('line');
253 253
             $reader->shouldReceive('char')->andReturn('char');
@@ -255,11 +255,11 @@  discard block
 block discarded – undo
255 255
             return $reader;
256 256
         };
257 257
 
258
-        $container['climate/util'] = function (Container $container) {
258
+        $container['climate/util'] = function(Container $container) {
259 259
             return new UtilFactory($container['climate/system']);
260 260
         };
261 261
 
262
-        $container['climate'] = function (Container $container) {
262
+        $container['climate'] = function(Container $container) {
263 263
             $climate = new CLImate();
264 264
 
265 265
             $climate->setOutput($container['climate/output']);
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
      */
279 279
     public function registerView(Container $container)
280 280
     {
281
-        $container['view/loader'] = function (Container $container) {
281
+        $container['view/loader'] = function(Container $container) {
282 282
             return new MustacheLoader([
283 283
                 'logger'    => $container['logger'],
284 284
                 'base_path' => $container['config']['base_path'],
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
             ]);
289 289
         };
290 290
 
291
-        $container['view/engine'] = function (Container $container) {
291
+        $container['view/engine'] = function(Container $container) {
292 292
             return new MustacheEngine([
293 293
                 'logger' => $container['logger'],
294 294
                 'cache'  => MustacheEngine::DEFAULT_CACHE_PATH,
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
             ]);
297 297
         };
298 298
 
299
-        $container['view'] = function (Container $container) {
299
+        $container['view'] = function(Container $container) {
300 300
             return new GenericView([
301 301
                 'logger' => $container['logger'],
302 302
                 'engine' => $container['view/engine']
@@ -312,15 +312,15 @@  discard block
 block discarded – undo
312 312
      */
313 313
     public function registerTranslator(Container $container)
314 314
     {
315
-        $container['locales/manager'] = function (Container $container) {
315
+        $container['locales/manager'] = function(Container $container) {
316 316
             return new LocalesManager([
317 317
                 'locales' => [
318
-                    'en' => [ 'locale' => 'en-US' ]
318
+                    'en' => ['locale' => 'en-US']
319 319
                 ]
320 320
             ]);
321 321
         };
322 322
 
323
-        $container['translator'] = function (Container $container) {
323
+        $container['translator'] = function(Container $container) {
324 324
             return new Translator([
325 325
                 'manager' => $container['locales/manager']
326 326
             ]);
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
      */
336 336
     public function registerLogger(Container $container)
337 337
     {
338
-        $container['logger'] = function (Container $container) {
338
+        $container['logger'] = function(Container $container) {
339 339
             return new NullLogger();
340 340
         };
341 341
     }
@@ -348,14 +348,14 @@  discard block
 block discarded – undo
348 348
      */
349 349
     public function registerCache(Container $container)
350 350
     {
351
-        $container['cache'] = function ($container) {
351
+        $container['cache'] = function($container) {
352 352
             return new Pool(new Ephemeral());
353 353
         };
354 354
     }
355 355
 
356 356
     public function registerDatabase(Container $container)
357 357
     {
358
-        $container['database'] = function (Container $container) {
358
+        $container['database'] = function(Container $container) {
359 359
             $pdo = new PDO('sqlite::memory:');
360 360
             $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
361 361
             return $pdo;
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
         $this->registerLogger($container);
368 368
         $this->registerCache($container);
369 369
 
370
-        $container['metadata/loader'] = function (Container $container) {
370
+        $container['metadata/loader'] = function(Container $container) {
371 371
             return new MetadataLoader([
372 372
                 'logger'    => $container['logger'],
373 373
                 'cache'     => $container['cache'],
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
         $this->registerLogger($container);
387 387
         $this->registerDatabase($container);
388 388
 
389
-        $container['source/factory'] = function (Container $container) {
389
+        $container['source/factory'] = function(Container $container) {
390 390
             return new Factory([
391 391
                 'map' => [
392 392
                     'database' => DatabaseSource::class
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
         $this->registerDatabase($container);
406 406
         $this->registerLogger($container);
407 407
 
408
-        $container['property/factory'] = function (Container $container) {
408
+        $container['property/factory'] = function(Container $container) {
409 409
             return new Factory([
410 410
                 'resolver_options' => [
411 411
                     'prefix' => '\\Charcoal\\Property\\',
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
         $this->registerDatabase($container);
427 427
         $this->registerLogger($container);
428 428
 
429
-        $container['property/display/factory'] = function (Container $container) {
429
+        $container['property/display/factory'] = function(Container $container) {
430 430
             return new Factory([
431 431
                 'resolver_options' => [
432 432
                     'suffix' => 'Display'
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
         $this->registerPropertyFactory($container);
449 449
         $this->registerSourceFactory($container);
450 450
 
451
-        $container['model/factory'] = function (Container $container) {
451
+        $container['model/factory'] = function(Container $container) {
452 452
             return new Factory([
453 453
                 'arguments' => [[
454 454
                     'container'        => $container,
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
 
464 464
     public function registerAcl(Container $container)
465 465
     {
466
-        $container['admin/acl'] = function (Container $container) {
466
+        $container['admin/acl'] = function(Container $container) {
467 467
             return new Acl();
468 468
         };
469 469
     }
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
         $this->registerLogger($container);
474 474
         $this->registerModelFactory($container);
475 475
 
476
-        $container['admin/authenticator'] = function (Container $container) {
476
+        $container['admin/authenticator'] = function(Container $container) {
477 477
             return new Authenticator([
478 478
                 'logger'        => $container['logger'],
479 479
                 'user_type'     => 'charcoal/admin/user',
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
         $this->registerLogger($container);
490 490
         $this->registerAcl($container);
491 491
 
492
-        $container['admin/authorizer'] = function (Container $container) {
492
+        $container['admin/authorizer'] = function(Container $container) {
493 493
             return new Authorizer([
494 494
                 'logger'    => $container['logger'],
495 495
                 'acl'       => $container['admin/acl'],
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
         $this->registerLogger($container);
504 504
         $this->registerModelFactory($container);
505 505
 
506
-        $container['model/collection/loader'] = function (Container $container) {
506
+        $container['model/collection/loader'] = function(Container $container) {
507 507
             return new \Charcoal\Loader\CollectionLoader([
508 508
                 'logger'  => $container['logger'],
509 509
                 'factory' => $container['model/factory']
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
 
514 514
     public function registerEmailFactory(Container $container)
515 515
     {
516
-        $container['email/factory'] = function (Container $container) {
516
+        $container['email/factory'] = function(Container $container) {
517 517
             return new Factory([
518 518
                 'map' => [
519 519
                     'email' => Email::class
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
 
525 525
     public function registerElfinderConfig(Container $container)
526 526
     {
527
-        $container['elfinder/config'] = function (Container $container) {
527
+        $container['elfinder/config'] = function(Container $container) {
528 528
             return [];
529 529
         };
530 530
     }
Please login to merge, or discard this patch.
src/Charcoal/Attachment/Traits/AttachmentContainerTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@
 block discarded – undo
183 183
                     $attMeta['faIcon'] = $faIcon;
184 184
 
185 185
                     // Custom forms
186
-                    $attMeta['formIdent']      = isset($attMeta['form_ident'])       ? $attMeta['form_ident']       : null;
186
+                    $attMeta['formIdent']      = isset($attMeta['form_ident']) ? $attMeta['form_ident'] : null;
187 187
                     $attMeta['quickFormIdent'] = isset($attMeta['quick_form_ident']) ? $attMeta['quick_form_ident'] : null;
188 188
 
189 189
                     $this->attachableObjects[$attType] = $attMeta;
Please login to merge, or discard this patch.
src/Charcoal/Attachment/Object/Gallery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,6 +50,6 @@
 block discarded – undo
50 50
      */
51 51
     public function columnWidth()
52 52
     {
53
-        return (string)ceil(12/$this->numColumns);
53
+        return (string) ceil(12 / $this->numColumns);
54 54
     }
55 55
 }
Please login to merge, or discard this patch.