Test Setup Failed
Push — a-simpler-manager ( 0b86bc...b39f07 )
by Ben
06:34
created
src/Managers/Assistants/ModulesAssistant.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,9 @@
 block discarded – undo
30 30
 
31 31
     public function routeModulesAssistant(string $action, $model = null, ...$parameters): ?string
32 32
     {
33
-        if(!in_array($action, ['modules-index','modules-edit','modules-update','modules-delete','modules-create','modules-store'])) return null;
33
+        if(!in_array($action, ['modules-index','modules-edit','modules-update','modules-delete','modules-create','modules-store'])) {
34
+            return null;
35
+        }
34 36
 
35 37
         if(count($parameters) < 1 || ! reset($parameters) instanceof ActsAsChild) {
36 38
             throw new \InvalidArgumentException('Missing arguments. Modules route definition requires two parameters: parent model and module model. ');
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/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/ManagedModels/Assistants/ManagedModelDefaults.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,9 @@
 block discarded – undo
44 44
 
45 45
     private function statusAsLabel(): string
46 46
     {
47
-        if(!$this instanceof ProvidesUrl) return '';
47
+        if(!$this instanceof ProvidesUrl) {
48
+            return '';
49
+        }
48 50
 
49 51
         if ($this->current_status === PageState::PUBLISHED) {
50 52
             return '<a href="' . $this->url() . '" target="_blank"><em>online</em></a>';
Please login to merge, or discard this patch.