Test Setup Failed
Push — a-simpler-manager ( 332d14...c08fd0 )
by Ben
07:00
created
src/Managers/Assistants/CrudAssistant.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,7 +39,9 @@  discard block
 block discarded – undo
39 39
 
40 40
     public function canCrudAssistant(string $action, $model = null): bool
41 41
     {
42
-        if(!in_array($action, ['index', 'create', 'store', 'edit', 'update', 'delete'])) return false;
42
+        if(!in_array($action, ['index', 'create', 'store', 'edit', 'update', 'delete'])) {
43
+            return false;
44
+        }
43 45
 
44 46
         try {
45 47
 
@@ -58,9 +60,13 @@  discard block
 block discarded – undo
58 60
             return false;
59 61
         }
60 62
 
61
-        if(in_array($action, ['index', 'create', 'store'])) return true;
63
+        if(in_array($action, ['index', 'create', 'store'])) {
64
+            return true;
65
+        }
62 66
 
63
-        if(!$model || !$model instanceof StatefulContract) return true;
67
+        if(!$model || !$model instanceof StatefulContract) {
68
+            return true;
69
+        }
64 70
 
65 71
         // Model cannot be in deleted state for editing purposes.
66 72
         if(in_array($action, ['edit', 'update'])) {
Please login to merge, or discard this patch.