Passed
Pull Request — 2.x (#1360)
by Harings
14:11
created
src/View/Components/Wysiwyg.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -69,18 +69,18 @@
 block discarded – undo
69 69
     public function render()
70 70
     {
71 71
         if ($this->toolbarOptions) {
72
-            $toolbarOptions = array_map(static function ($option) {
72
+            $toolbarOptions = array_map(static function($option) {
73 73
                 if ($option === 'list-unordered') {
74
-                    return (object)['list' => 'bullet'];
74
+                    return (object) ['list' => 'bullet'];
75 75
                 }
76 76
                 if ($option === 'list-ordered') {
77
-                    return (object)['list' => 'ordered'];
77
+                    return (object) ['list' => 'ordered'];
78 78
                 }
79 79
                 if ($option === 'h1') {
80
-                    return (object)['header' => 1];
80
+                    return (object) ['header' => 1];
81 81
                 }
82 82
                 if ($option === 'h2') {
83
-                    return (object)['header' => 2];
83
+                    return (object) ['header' => 2];
84 84
                 }
85 85
                 return $option;
86 86
             }, $this->toolbarOptions);
Please login to merge, or discard this patch.
src/View/Components/Input.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
     public function render()
62 62
     {
63 63
         return view('twill::partials.form._input', [
64
-            'onChangeFullAttribute' => $this->onChangeAttribute ? "('".$this->onChangeAttribute."', ...arguments)" : "",
64
+            'onChangeFullAttribute' => $this->onChangeAttribute ? "('" . $this->onChangeAttribute . "', ...arguments)" : "",
65 65
         ]);
66 66
     }
67 67
 }
Please login to merge, or discard this patch.
src/View/Components/FieldWithOptions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
     public function getOptions(): array
69 69
     {
70 70
         return is_object($this->options) && method_exists($this->options, 'map') ? $this->options->map(
71
-            function ($label, $value) {
71
+            function($label, $value) {
72 72
                 return [
73 73
                     'value' => $value,
74 74
                     'label' => $label,
Please login to merge, or discard this patch.
src/View/Components/Browser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
         $this->routePrefix = $routePrefix;
58 58
         $this->params = $params;
59 59
 
60
-        $endpointsFromModules = isset($this->modules) ? collect($this->modules)->map(function ($module) {
60
+        $endpointsFromModules = isset($this->modules) ? collect($this->modules)->map(function($module) {
61 61
             return [
62 62
                 'label' => $module['label'] ?? ucfirst($module['name']),
63 63
                 'value' => moduleRoute(
Please login to merge, or discard this patch.
src/TwillServiceProvider.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     }
139 139
 
140 140
     public static function supportsBladeComponents(): bool {
141
-        return (int)explode('.', app()->version())[0] >= 8;
141
+        return (int) explode('.', app()->version())[0] >= 8;
142 142
     }
143 143
 
144 144
     /**
@@ -153,13 +153,13 @@  discard block
 block discarded – undo
153 153
         }
154 154
 
155 155
         if (config('twill.enabled.media-library')) {
156
-            $this->app->singleton('imageService', function () {
156
+            $this->app->singleton('imageService', function() {
157 157
                 return $this->app->make(config('twill.media_library.image_service'));
158 158
             });
159 159
         }
160 160
 
161 161
         if (config('twill.enabled.file-library')) {
162
-            $this->app->singleton('fileService', function () {
162
+            $this->app->singleton('fileService', function() {
163 163
                 return $this->app->make(config('twill.file_library.file_service'));
164 164
             });
165 165
         }
@@ -397,20 +397,20 @@  discard block
 block discarded – undo
397 397
     {
398 398
         $blade = $this->app['view']->getEngineResolver()->resolve('blade')->getCompiler();
399 399
 
400
-        $blade->directive('dd', function ($param) {
400
+        $blade->directive('dd', function($param) {
401 401
             return "<?php dd({$param}); ?>";
402 402
         });
403 403
 
404
-        $blade->directive('dumpData', function ($data) {
404
+        $blade->directive('dumpData', function($data) {
405 405
             return sprintf("<?php (new Symfony\Component\VarDumper\VarDumper)->dump(%s); exit; ?>",
406 406
                 null != $data ? $data : "get_defined_vars()");
407 407
         });
408 408
 
409
-        $blade->directive('formField', function ($expression) {
409
+        $blade->directive('formField', function($expression) {
410 410
             return $this->includeView('partials.form._', $expression);
411 411
         });
412 412
 
413
-        $blade->directive('partialView', function ($expression) {
413
+        $blade->directive('partialView', function($expression) {
414 414
             $expressionAsArray = str_getcsv($expression, ',', '\'');
415 415
 
416 416
             [$moduleName, $viewName] = $expressionAsArray;
@@ -445,13 +445,13 @@  discard block
 block discarded – undo
445 445
             ?>";
446 446
         });
447 447
 
448
-        $blade->directive('pushonce', function ($expression) {
448
+        $blade->directive('pushonce', function($expression) {
449 449
             [$pushName, $pushSub] = explode(':', trim(substr($expression, 1, -1)));
450 450
             $key = '__pushonce_' . $pushName . '_' . str_replace('-', '_', $pushSub);
451 451
             return "<?php if(! isset(\$__env->{$key})): \$__env->{$key} = 1; \$__env->startPush('{$pushName}'); ?>";
452 452
         });
453 453
 
454
-        $blade->directive('endpushonce', function () {
454
+        $blade->directive('endpushonce', function() {
455 455
             return '<?php $__env->stopPush(); endif; ?>';
456 456
         });
457 457
 
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
 
492 492
         View::composer('twill::partials.navigation.*', ActiveNavigation::class);
493 493
 
494
-        View::composer(['admin.*', 'templates.*', 'twill::*'], function ($view) {
494
+        View::composer(['admin.*', 'templates.*', 'twill::*'], function($view) {
495 495
             $with = array_merge([
496 496
                 'renderForBlocks' => false,
497 497
                 'renderForModal' => false,
Please login to merge, or discard this patch.