Passed
Pull Request — 2.x (#729)
by Antonio Carlos
05:57
created
src/RouteServiceProvider.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
         $middlewares,
80 80
         $supportSubdomainRouting
81 81
     ) {
82
-        $internalRoutes = function ($router) use (
82
+        $internalRoutes = function($router) use (
83 83
             $middlewares,
84 84
             $supportSubdomainRouting
85 85
         ) {
86
-            $router->group(['middleware' => $middlewares], function ($router) {
86
+            $router->group(['middleware' => $middlewares], function($router) {
87 87
                 require __DIR__ . '/../routes/admin.php';
88 88
             });
89 89
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
                         ? ['supportSubdomainRouting']
94 94
                         : [],
95 95
                 ],
96
-                function ($router) {
96
+                function($router) {
97 97
                     require __DIR__ . '/../routes/auth.php';
98 98
                 }
99 99
             );
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
                         ? ['twill_auth:twill_users']
105 105
                         : [],
106 106
                 ],
107
-                function ($router) {
107
+                function($router) {
108 108
                     require __DIR__ . '/../routes/templates.php';
109 109
                 }
110 110
             );
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             $groupOptions + [
115 115
                 'namespace' => $this->namespace . '\Admin',
116 116
             ],
117
-            function ($router) use ($internalRoutes, $supportSubdomainRouting) {
117
+            function($router) use ($internalRoutes, $supportSubdomainRouting) {
118 118
                 $router->group(
119 119
                     [
120 120
                         'domain' => config('twill.admin_app_url'),
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
                         config('twill.admin_middleware_group', 'web'),
146 146
                     ],
147 147
                 ],
148
-                function ($router) {
148
+                function($router) {
149 149
                     $router->group(
150 150
                         [
151 151
                             'middleware' => $this->app->environment(
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                                 ? ['twill_auth:twill_users']
155 155
                                 : [],
156 156
                         ],
157
-                        function ($router) {
157
+                        function($router) {
158 158
                             require __DIR__ . '/../routes/templates.php';
159 159
                         }
160 160
                     );
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
      */
208 208
     protected function registerMacros()
209 209
     {
210
-        Route::macro('moduleShowWithPreview', function (
210
+        Route::macro('moduleShowWithPreview', function(
211 211
             $moduleName,
212 212
             $routePrefix = null,
213 213
             $controllerName = null
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
                 ->middleware(['web', 'twill_auth:twill_users', 'can:list']);
242 242
         });
243 243
 
244
-        Route::macro('module', function (
244
+        Route::macro('module', function(
245 245
             $slug,
246 246
             $options = [],
247 247
             $resource_options = [],
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
             $_slug = Arr::last($slugs);
253 253
             $className = implode(
254 254
                 '',
255
-                array_map(function ($s) {
255
+                array_map(function($s) {
256 256
                     return ucfirst(Str::singular($s));
257 257
                 }, $slugs)
258 258
             );
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
             if ($resource) {
377 377
                 Route::group(
378 378
                     ['as' => $resourceCustomGroupPrefix],
379
-                    function () use ($slug, $className, $resource_options) {
379
+                    function() use ($slug, $className, $resource_options) {
380 380
                         Route::resource(
381 381
                             $slug,
382 382
                             "{$className}Controller",
Please login to merge, or discard this patch.
src/Services/Routing/HasRoutes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
         $routesFile
16 16
     ) {
17 17
         if (file_exists($routesFile)) {
18
-            $hostRoutes = function ($router) use (
18
+            $hostRoutes = function($router) use (
19 19
                 $middlewares,
20 20
                 $namespace,
21 21
                 $routesFile
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
                         'namespace' => $namespace,
26 26
                         'middleware' => $middlewares,
27 27
                     ],
28
-                    function ($router) use ($routesFile) {
28
+                    function($router) use ($routesFile) {
29 29
                         require $routesFile;
30 30
                     }
31 31
                 );
Please login to merge, or discard this patch.
src/Services/Capsules/HasCapsules.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
         return $list
27 27
             ->where('enabled', true)
28
-            ->map(function ($capsule) use ($path) {
28
+            ->map(function($capsule) use ($path) {
29 29
                 return $this->makeCapsule($capsule, $path);
30 30
             });
31 31
     }
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     public function getCapsuleByModule($module)
41 41
     {
42 42
         return $this->getCapsuleList()
43
-            ->filter(function ($capsule) use ($module) {
43
+            ->filter(function($capsule) use ($module) {
44 44
                 return Str::lower($capsule['plural']) == Str::lower($module);
45 45
             })
46 46
             ->first();
Please login to merge, or discard this patch.
src/CapsulesServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     public function registerCapsules()
50 50
     {
51
-        $this->manager->getCapsuleList()->map(function ($capsule) {
51
+        $this->manager->getCapsuleList()->map(function($capsule) {
52 52
             $this->registerCapsule($capsule);
53 53
         });
54 54
     }
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
     {
63 63
         $this->manager
64 64
             ->getCapsuleList()
65
-            ->each(function ($capsule) use ($router) {
65
+            ->each(function($capsule) use ($router) {
66 66
                 $this->registerCapsuleRoutes($router, $capsule);
67 67
             });
68 68
     }
69 69
 
70 70
     public function registerViewPaths()
71 71
     {
72
-        $this->callAfterResolving('view', function ($view) {
72
+        $this->callAfterResolving('view', function($view) {
73 73
             $view->addLocation(config('twill.capsules.path'));
74 74
         });
75 75
     }
Please login to merge, or discard this patch.
src/TwillServiceProvider.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -134,13 +134,13 @@  discard block
 block discarded – undo
134 134
         }
135 135
 
136 136
         if (config('twill.enabled.media-library')) {
137
-            $this->app->singleton('imageService', function () {
137
+            $this->app->singleton('imageService', function() {
138 138
                 return $this->app->make(config('twill.media_library.image_service'));
139 139
             });
140 140
         }
141 141
 
142 142
         if (config('twill.enabled.file-library')) {
143
-            $this->app->singleton('fileService', function () {
143
+            $this->app->singleton('fileService', function() {
144 144
                 return $this->app->make(config('twill.file_library.file_service'));
145 145
             });
146 146
         }
@@ -346,20 +346,20 @@  discard block
 block discarded – undo
346 346
     {
347 347
         $blade = $this->app['view']->getEngineResolver()->resolve('blade')->getCompiler();
348 348
 
349
-        $blade->directive('dd', function ($param) {
349
+        $blade->directive('dd', function($param) {
350 350
             return "<?php dd({$param}); ?>";
351 351
         });
352 352
 
353
-        $blade->directive('dumpData', function ($data) {
353
+        $blade->directive('dumpData', function($data) {
354 354
             return sprintf("<?php (new Symfony\Component\VarDumper\VarDumper)->dump(%s); exit; ?>",
355 355
                 null != $data ? $data : "get_defined_vars()");
356 356
         });
357 357
 
358
-        $blade->directive('formField', function ($expression) {
358
+        $blade->directive('formField', function($expression) {
359 359
             return $this->includeView('partials.form._', $expression);
360 360
         });
361 361
 
362
-        $blade->directive('partialView', function ($expression) {
362
+        $blade->directive('partialView', function($expression) {
363 363
 
364 364
             $expressionAsArray = str_getcsv($expression, ',', '\'');
365 365
 
@@ -395,13 +395,13 @@  discard block
 block discarded – undo
395 395
             ?>";
396 396
         });
397 397
 
398
-        $blade->directive('pushonce', function ($expression) {
398
+        $blade->directive('pushonce', function($expression) {
399 399
             [$pushName, $pushSub] = explode(':', trim(substr($expression, 1, -1)));
400 400
             $key = '__pushonce_' . $pushName . '_' . str_replace('-', '_', $pushSub);
401 401
             return "<?php if(! isset(\$__env->{$key})): \$__env->{$key} = 1; \$__env->startPush('{$pushName}'); ?>";
402 402
         });
403 403
 
404
-        $blade->directive('endpushonce', function () {
404
+        $blade->directive('endpushonce', function() {
405 405
             return '<?php $__env->stopPush(); endif; ?>';
406 406
         });
407 407
 
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 
443 443
         View::composer('twill::partials.navigation.*', ActiveNavigation::class);
444 444
 
445
-        View::composer(['admin.*', 'templates.*', 'twill::*'], function ($view) {
445
+        View::composer(['admin.*', 'templates.*', 'twill::*'], function($view) {
446 446
             $with = array_merge([
447 447
                 'renderForBlocks' => false,
448 448
                 'renderForModal' => false,
Please login to merge, or discard this patch.
src/Commands/ModuleMake.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
             'hasFiles',
185 185
             'hasPosition',
186 186
             'hasRevisions',
187
-        ])->filter(function ($enabled) {
187
+        ])->filter(function($enabled) {
188 188
             return $enabled;
189 189
         });
190 190
 
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
 
453 453
         $stub = str_replace(
454 454
             ['{{repositoryClassName}}', '{{modelName}}', '{{repositoryTraits}}', '{{repositoryImports}}', '{{namespace}}', '{{modelClass}}'],
455
-            [$repositoryClassName, $modelName, $activeRepositoryTraitsString, $activeRepositoryTraitsImports,$this->namespace('repositories', 'Repositories'), $modelClass],
455
+            [$repositoryClassName, $modelName, $activeRepositoryTraitsString, $activeRepositoryTraitsImports, $this->namespace('repositories', 'Repositories'), $modelClass],
456 456
             $this->files->get(__DIR__ . '/stubs/repository.stub')
457 457
         );
458 458
 
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
 
480 480
         $stub = str_replace(
481 481
             ['{{moduleName}}', '{{controllerClassName}}', '{{namespace}}'],
482
-            [$moduleName, $controllerClassName,$this->namespace('controllers', 'Http\Controllers\Admin')],
482
+            [$moduleName, $controllerClassName, $this->namespace('controllers', 'Http\Controllers\Admin')],
483 483
             $this->files->get(__DIR__ . '/stubs/controller.stub')
484 484
         );
485 485
 
@@ -504,8 +504,8 @@  discard block
 block discarded – undo
504 504
         $requestClassName = $modelName . 'Request';
505 505
 
506 506
         $stub = str_replace(
507
-            ['{{requestClassName}}','{{namespace}}'],
508
-            [$requestClassName,$this->namespace('requests', 'Http\Requests\Admin')],
507
+            ['{{requestClassName}}', '{{namespace}}'],
508
+            [$requestClassName, $this->namespace('requests', 'Http\Requests\Admin')],
509 509
             $this->files->get(__DIR__ . '/stubs/request.stub')
510 510
         );
511 511
 
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
         }
585 585
 
586 586
         $this->checkCapsuleDirectory(
587
-            $this->moduleBasePath = config('twill.capsules.path')."/{$moduleName}"
587
+            $this->moduleBasePath = config('twill.capsules.path') . "/{$moduleName}"
588 588
         );
589 589
 
590 590
         $this->makeDir($this->moduleBasePath);
Please login to merge, or discard this patch.