Passed
Pull Request — master (#303)
by Philippe
61:32 queued 02:56
created
src/Pages/PageManager.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -63,15 +63,15 @@  discard block
 block discarded – undo
63 63
     {
64 64
         $permission = 'update-page';
65 65
 
66
-        if (in_array($verb, ['index','show'])) {
66
+        if (in_array($verb, ['index', 'show'])) {
67 67
             $permission = 'view-page';
68
-        } elseif (in_array($verb, ['create','store'])) {
68
+        } elseif (in_array($verb, ['create', 'store'])) {
69 69
             $permission = 'create-page';
70 70
         } elseif (in_array($verb, ['delete'])) {
71 71
             $permission = 'delete-page';
72 72
         }
73 73
 
74
-        if (! auth()->guard('chief')->user()->hasPermissionTo($permission)) {
74
+        if (!auth()->guard('chief')->user()->hasPermissionTo($permission)) {
75 75
             throw NotAllowedManagerRoute::notAllowedPermission($permission, $this);
76 76
         }
77 77
     }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     public function fieldArrangement($key = null): FieldArrangement
134 134
     {
135 135
         if ($key == 'create') {
136
-            return new FieldArrangement($this->fieldsWithAssistantFields()->filterBy(function ($field) {
136
+            return new FieldArrangement($this->fieldsWithAssistantFields()->filterBy(function($field) {
137 137
                 return in_array($field->key, ['title']);
138 138
             }));
139 139
         }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     public function saveFields(Request $request)
166 166
     {
167 167
         // Store the morph_key upon creation
168
-        if ($this->model instanceof MorphableContract && ! $this->model->morph_key) {
168
+        if ($this->model instanceof MorphableContract && !$this->model->morph_key) {
169 169
             $this->model->morph_key = $this->model->morphKey();
170 170
         }
171 171
 
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
             if (is_array_empty($translation)) {
211 211
 
212 212
                 // Nullify all values
213
-                $trans[$locale] = array_map(function ($value) {
213
+                $trans[$locale] = array_map(function($value) {
214 214
                     return null;
215 215
                 }, $translation);
216 216
                 continue;
Please login to merge, or discard this patch.
src/States/PageStatePresenter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     {
29 29
         $class = $this->pageState->isOnline() ? 'text-success' : 'text-warning';
30 30
 
31
-        return '<span class="inline-xs stack-s '.$class.'">' . $this->stateAsLabel() . '</span>';
31
+        return '<span class="inline-xs stack-s '.$class.'">'.$this->stateAsLabel().'</span>';
32 32
     }
33 33
 
34 34
     /**
Please login to merge, or discard this patch.
src/Management/Assistants/ManagesAssistants.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
     public function assistant(string $assistantKey): Assistant
52 52
     {
53 53
         if (!$this->isAssistedBy($assistantKey)) {
54
-            throw new MissingAssistant('No assistant [' . $assistantKey . '] registered on manager ' . static::class);
54
+            throw new MissingAssistant('No assistant ['.$assistantKey.'] registered on manager '.static::class);
55 55
         }
56 56
 
57 57
         $instance = app($this->getAssistantClass($assistantKey));
Please login to merge, or discard this patch.
src/Management/Details/HasDetails.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
         $genericModelInstance = $this->modelInstance();
17 17
 
18 18
         // Generic model details
19
-        $id = Str::slug($this->registration->key(). ($this->hasExistingModel() ? '-'. $this->existingModel()->id : ''));
19
+        $id = Str::slug($this->registration->key().($this->hasExistingModel() ? '-'.$this->existingModel()->id : ''));
20 20
         $key = $this->registration->key();
21 21
         $labelSingular = property_exists($genericModelInstance, 'labelSingular') ? $genericModelInstance->labelSingular : Str::singular($key);
22 22
         $labelPlural = property_exists($genericModelInstance, 'labelPlural') ? $genericModelInstance->labelPlural : Str::plural($key);
Please login to merge, or discard this patch.
src/Management/AbstractManager.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             return $this->indexPagination($builder);
88 88
         }
89 89
 
90
-        return $builder->get()->map(function ($model) {
90
+        return $builder->get()->map(function($model) {
91 91
             return (new static($this->registration))->manage($model);
92 92
         });
93 93
     }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
     {
116 116
         $paginator = $builder->paginate($this->pageCount);
117 117
 
118
-        $modifiedCollection = $builder->paginate($this->pageCount)->getCollection()->transform(function ($model) {
118
+        $modifiedCollection = $builder->paginate($this->pageCount)->getCollection()->transform(function($model) {
119 119
             return (new static($this->registration))->manage($model);
120 120
         });
121 121
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 
189 189
     public function guard($verb): Manager
190 190
     {
191
-        if (! $this->can($verb)) {
191
+        if (!$this->can($verb)) {
192 192
             NotAllowedManagerRoute::notAllowedVerb($verb, $this);
193 193
         }
194 194
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         $fields = $this->fields();
212 212
 
213 213
         foreach ($this->assistantsAsClassNames() as $assistantClass) {
214
-            if (! method_exists($assistantClass, 'fields')) {
214
+            if (!method_exists($assistantClass, 'fields')) {
215 215
                 continue;
216 216
             }
217 217
 
@@ -303,9 +303,9 @@  discard block
 block discarded – undo
303 303
             static::$bootedTraitMethods[$baseMethod] = [];
304 304
 
305 305
             foreach (class_uses_recursive($class) as $trait) {
306
-                $method = class_basename($trait) . ucfirst($baseMethod);
306
+                $method = class_basename($trait).ucfirst($baseMethod);
307 307
 
308
-                if (method_exists($class, $method) && ! in_array($method, static::$bootedTraitMethods[$baseMethod])) {
308
+                if (method_exists($class, $method) && !in_array($method, static::$bootedTraitMethods[$baseMethod])) {
309 309
                     static::$bootedTraitMethods[$baseMethod][] = lcfirst($method);
310 310
                 }
311 311
             }
Please login to merge, or discard this patch.
src/HealthMonitor/Checks/HomepageAccessibleCheck.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Thinktomorrow\Chief\HealthMonitor\Checks;
4 4
 
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
     private function get_http_response_code(string $url)
16 16
     {
17
-        if ($url =='') {
17
+        if ($url == '') {
18 18
             return false;
19 19
         }
20 20
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     public function message(): string
34 34
     {
35
-        return 'Het lijkt erop dat de homepagina niet meer bereikbaar is. <a href="'. route('chief.back.settings.edit') .'" class="text-secondary-800 underline hover:text-white">Kies een nieuwe</a>.';
35
+        return 'Het lijkt erop dat de homepagina niet meer bereikbaar is. <a href="'.route('chief.back.settings.edit').'" class="text-secondary-800 underline hover:text-white">Kies een nieuwe</a>.';
36 36
     }
37 37
 
38 38
     public function notifiers(): array
Please login to merge, or discard this patch.
src/HealthMonitor/Checks/HealthCheck.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Thinktomorrow\Chief\HealthMonitor\Checks;
4 4
 
Please login to merge, or discard this patch.
src/HealthMonitor/Checks/HomepageSetCheck.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Thinktomorrow\Chief\HealthMonitor\Checks;
4 4
 
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
     public function message(): string
18 18
     {
19
-        return 'Het lijkt erop dat er geen homepagina ingesteld is. Stel er een in hier: <a href="'. route('chief.back.settings.edit') .'" class="text-secondary-800 underline hover:text-white">Settings</a>';
19
+        return 'Het lijkt erop dat er geen homepagina ingesteld is. Stel er een in hier: <a href="'.route('chief.back.settings.edit').'" class="text-secondary-800 underline hover:text-white">Settings</a>';
20 20
     }
21 21
 
22 22
     public function notifiers(): array
Please login to merge, or discard this patch.
src/HealthMonitor/Notifiers/Notifier.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Thinktomorrow\Chief\HealthMonitor\Notifiers;
4 4
 
Please login to merge, or discard this patch.