Test Failed
Push — ft/states ( eebc9c )
by Ben
29:42 queued 08:49
created
src/HealthMonitor/Checks/HomepageAccessibleCheck.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Thinktomorrow\Chief\HealthMonitor\Checks;
6 6
 
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     }
15 15
 
16 16
     private function get_http_response_code(string $url) {
17
-        if($url =='') return false;
17
+        if ($url == '') return false;
18 18
 
19 19
         // Avoid ssl errors: SSL operation failed with code 1
20 20
         stream_context_set_default([
@@ -30,6 +30,6 @@  discard block
 block discarded – undo
30 30
 
31 31
     public function message(): string
32 32
     {
33
-        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>.';
33
+        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>.';
34 34
     }
35 35
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,9 @@
 block discarded – undo
14 14
     }
15 15
 
16 16
     private function get_http_response_code(string $url) {
17
-        if($url =='') return false;
17
+        if($url =='') {
18
+            return false;
19
+        }
18 20
 
19 21
         // Avoid ssl errors: SSL operation failed with code 1
20 22
         stream_context_set_default([
Please login to merge, or discard this patch.
src/States/Archivable/ArchiveScope.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Thinktomorrow\Chief\States\Archivable;
6 6
 
@@ -13,6 +13,6 @@  discard block
 block discarded – undo
13 13
 {
14 14
     public function apply(Builder $builder, Model $model)
15 15
     {
16
-        $builder->where('state','<>', PageState::ARCHIVED);
16
+        $builder->where('state', '<>', PageState::ARCHIVED);
17 17
     }
18 18
 }
Please login to merge, or discard this patch.
src/States/Archivable/Archivable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 
24 24
     public function scopeUnarchived($query)
25 25
     {
26
-        $query->withoutGlobalScope(ArchiveScope::class)->where('state','<>', PageState::ARCHIVED);
26
+        $query->withoutGlobalScope(ArchiveScope::class)->where('state', '<>', PageState::ARCHIVED);
27 27
     }
28 28
 
29 29
     public function scopeWithArchived($query)
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->label() . '</span>';
31
+        return '<span class="inline-xs stack-s '.$class.'">'.$this->label().'</span>';
32 32
     }
33 33
 
34 34
     private function label()
Please login to merge, or discard this patch.
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/Management/Application/DeleteManagedModel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     public function handle(ManagedModel $model)
13 13
     {
14 14
         // For stateful transitions we will apply this deletion as a state
15
-        if($model instanceof StatefulContract) {
15
+        if ($model instanceof StatefulContract) {
16 16
             (new PageState($model))->apply('delete');
17 17
             $model->save();
18 18
         }
Please login to merge, or discard this patch.