Test Setup Failed
Push — a-simpler-manager ( f359da...273f7a )
by Ben
07:59
created
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/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/Modules/Assistants/ModuleCrudAssistant.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,9 @@
 block discarded – undo
31 31
 
32 32
     public function routeModuleCrudAssistant(string $action, $model = null, ...$parameters): ?string
33 33
     {
34
-        if(!in_array($action, ['create','store'])) return null;
34
+        if(!in_array($action, ['create','store'])) {
35
+            return null;
36
+        }
35 37
 
36 38
         return $this->generateRoute($action, $model, ... $parameters);
37 39
     }
Please login to merge, or discard this patch.
src/ManagedModels/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/Site/Urls/ProvidesUrl/BaseUrlSegment.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,14 +10,22 @@
 block discarded – undo
10 10
 {
11 11
     public static function find(array $segments, string $locale = null)
12 12
     {
13
-        if(count($segments) < 1) return '/';
14
-        if(count($segments) == 1) return reset($segments);
13
+        if(count($segments) < 1) {
14
+            return '/';
15
+        }
16
+        if(count($segments) == 1) {
17
+            return reset($segments);
18
+        }
15 19
 
16 20
         // Localized value
17
-        if (($key = $locale ?? app()->getlocale()) && isset($segments[$key])) return $segments[$key];
21
+        if (($key = $locale ?? app()->getlocale()) && isset($segments[$key])) {
22
+            return $segments[$key];
23
+        }
18 24
 
19 25
         // Fallback localized value
20
-        if (($fallback_locale = config('app.fallback_locale')) && isset($segments[$fallback_locale])) return $segments[$fallback_locale];
26
+        if (($fallback_locale = config('app.fallback_locale')) && isset($segments[$fallback_locale])) {
27
+            return $segments[$fallback_locale];
28
+        }
21 29
 
22 30
         // Fallback to first entry
23 31
         return reset($segments);
Please login to merge, or discard this patch.
src/Managers/Assistants/FragmentsAssistant.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,9 @@
 block discarded – undo
25 25
 
26 26
     public function routeFragmentsAssistant(string $action, $model = null, ...$parameters): ?string
27 27
     {
28
-        if(!in_array($action, ['fragments-index','fragments-reorder'])) return null;
28
+        if(!in_array($action, ['fragments-index','fragments-reorder'])) {
29
+            return null;
30
+        }
29 31
 
30 32
         return $this->generateRoute($action, $model, ...$parameters);
31 33
     }
Please login to merge, or discard this patch.
src/Fragments/Database/FragmentRepository.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,9 @@
 block discarded – undo
26 26
      */
27 27
     public function getByOwner(FragmentsOwner $owner): Collection
28 28
     {
29
-        if(!$context = ContextModel::ownedBy($owner)) return collect();
29
+        if(!$context = ContextModel::ownedBy($owner)) {
30
+            return collect();
31
+        }
30 32
 
31 33
         $fragmentModels = $context->fragments()->get();
32 34
 
Please login to merge, or discard this patch.
src/Old/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('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.
src/ManagedModels/Assistants/ManagedModelDefaults.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,9 @@
 block discarded – undo
63 63
 
64 64
     private function onlineStatusAsLabel(): string
65 65
     {
66
-        if(!$this instanceof StatefulContract) return '';
66
+        if(!$this instanceof StatefulContract) {
67
+            return '';
68
+        }
67 69
 
68 70
         if ($this->stateOf(PageState::KEY) === PageState::PUBLISHED) {
69 71
             return $this instanceof ProvidesUrl
Please login to merge, or discard this patch.