Test Setup Failed
Push — a-simpler-manager ( c7b435...29c609 )
by Ben
09:30
created
src/Managers/Assistants/ArchiveAssistant.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,9 @@  discard block
 block discarded – undo
27 27
 
28 28
     public function canArchiveAssistant(string $action, $model = null): bool
29 29
     {
30
-        if(!in_array($action, ['archive', 'unarchive', 'archive_index'])) return false;
30
+        if(!in_array($action, ['archive', 'unarchive', 'archive_index'])) {
31
+            return false;
32
+        }
31 33
 
32 34
         if($action === 'archive_index') {
33 35
             // Archive index is only visitable when there is at least one model archived.
@@ -37,7 +39,9 @@  discard block
 block discarded – undo
37 39
             return false;
38 40
         }
39 41
 
40
-        if(!$model || !$model instanceof StatefulContract) return false;
42
+        if(!$model || !$model instanceof StatefulContract) {
43
+            return false;
44
+        }
41 45
 
42 46
         return PageState::make($model)->can($action);
43 47
     }
Please login to merge, or discard this patch.
src/Managers/Assistants/PublishAssistant.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,16 +24,22 @@
 block discarded – undo
24 24
 
25 25
     public function routePublishAssistant(string $action, $model = null, ...$parameters): ?string
26 26
     {
27
-        if(!$this->canPublishAssistant($action, $model)) return null;
27
+        if(!$this->canPublishAssistant($action, $model)) {
28
+            return null;
29
+        }
28 30
 
29 31
         return $this->generateRoute($action, $model, ...$parameters);
30 32
     }
31 33
 
32 34
     public function canPublishAssistant(string $action, $model = null): bool
33 35
     {
34
-        if(!in_array($action, ['publish', 'unpublish'])) return false;
36
+        if(!in_array($action, ['publish', 'unpublish'])) {
37
+            return false;
38
+        }
35 39
 
36
-        if(!$model || !$model instanceof StatefulContract) return false;
40
+        if(!$model || !$model instanceof StatefulContract) {
41
+            return false;
42
+        }
37 43
 
38 44
         return PageState::make($model)->can($action);
39 45
     }
Please login to merge, or discard this patch.
src/Managers/Assistants/PreviewAssistant.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,9 @@  discard block
 block discarded – undo
9 9
 {
10 10
     public function canPreviewAssistant(string $action, $model = null): bool
11 11
     {
12
-        if($action !== 'preview' || !$model) return false;
12
+        if($action !== 'preview' || !$model) {
13
+            return false;
14
+        }
13 15
 
14 16
         return $model instanceof ProvidesUrl;
15 17
     }
@@ -27,7 +29,9 @@  discard block
 block discarded – undo
27 29
      */
28 30
     public function routePreviewAssistant(string $action, $model = null, ...$parameters): ?string
29 31
     {
30
-        if(!$this->canPreviewAssistant($action, $model)) return null;
32
+        if(!$this->canPreviewAssistant($action, $model)) {
33
+            return null;
34
+        }
31 35
 
32 36
         return $model->url();
33 37
     }
Please login to merge, or discard this patch.
src/Filters/Filters.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,9 @@
 block discarded – undo
46 46
 
47 47
     public function anyRenderable(): bool
48 48
     {
49
-        if($this->isEmpty()) return false;
49
+        if($this->isEmpty()) {
50
+            return false;
51
+        }
50 52
 
51 53
         // If at least one of the filters has content to be rendered.
52 54
         foreach($this->filters as $filter) {
Please login to merge, or discard this patch.
src/ManagedModels/Assistants/SavingFields.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,9 @@
 block discarded – undo
45 45
             // Dynamic localized values or standard translated
46 46
             // For standard translations we set value with the colon notation, e.g. title:en
47 47
             $this->foreachTranslationEntry(data_get($input, 'trans', []), function($locale, $key, $value) use($field){
48
-                if($key !== $field->getColumn()) return;
48
+                if($key !== $field->getColumn()) {
49
+                    return;
50
+                }
49 51
 
50 52
                 if($this->isFieldForDynamicValue($field)) {
51 53
                     $this->setDynamic($key, $value, $locale);
Please login to merge, or discard this patch.
src/PageBuilder/PageBuilder.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,9 @@
 block discarded – undo
107 107
         // Astrotomic translatable
108 108
         if($model instanceof Translatable) {
109 109
             foreach (config('thinktomorrow.chief.locales') as $locale) {
110
-                if(!isset($trans[$locale])) $trans[$locale] = [];
110
+                if(!isset($trans[$locale])) {
111
+                    $trans[$locale] = [];
112
+                }
111 113
 
112 114
                 $trans[$locale] = array_merge($trans[$locale], $model->getTranslation($locale)->toArray());
113 115
             }
Please login to merge, or discard this patch.