Passed
Push — master ( 4602de...f58930 )
by Mohammad
02:57
created
src/Utility/Controller.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -344,9 +344,10 @@
 block discarded – undo
344 344
         }
345 345
 
346 346
         if ($entity) {
347
-            if($appendEntity)
348
-                return response()->json(  ['status' => true, 'message' => __('messages.success'), 'data' => $entity],
347
+            if($appendEntity) {
348
+                            return response()->json(  ['status' => true, 'message' => __('messages.success'), 'data' => $entity],
349 349
                     JsonResponse::HTTP_OK);
350
+            }
350 351
             return response()->json(null, JsonResponse::HTTP_NO_CONTENT);
351 352
         }
352 353
 
Please login to merge, or discard this patch.
src/Utility/AbstractRepository.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,9 +100,9 @@
 block discarded – undo
100 100
                             }
101 101
                         });
102 102
                     });
103
+                } else {
104
+                                    $latest->orWhere($columns, 'like', "%" . $criteria['search'] . "%", 'or');
103 105
                 }
104
-                else
105
-                    $latest->orWhere($columns, 'like', "%" . $criteria['search'] . "%", 'or');
106 106
             }
107 107
         }
108 108
         unset($criteria['search']);
Please login to merge, or discard this patch.
src/Forms/formGenerator.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,8 +86,9 @@  discard block
 block discarded – undo
86 86
      */
87 87
     function getFillables($entity)
88 88
     {
89
-        if(!empty($entity->getFillable()))
90
-            return $entity->getFillable();
89
+        if(!empty($entity->getFillable())) {
90
+                    return $entity->getFillable();
91
+        }
91 92
 
92 93
         $columns = \Schema::getColumnListing($entity->getTable());
93 94
 
@@ -107,8 +108,9 @@  discard block
 block discarded – undo
107 108
      */
108 109
     function getInputs($entity)
109 110
     {
110
-        if($this->inputs)
111
-            return $this->inputs;
111
+        if($this->inputs) {
112
+                    return $this->inputs;
113
+        }
112 114
 
113 115
         return $this->generateInputs($entity);
114 116
     }
Please login to merge, or discard this patch.
src/Commands/Generator.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -104,8 +104,7 @@  discard block
 block discarded – undo
104 104
         {
105 105
             $createHtml = $this->formGenerator->generateForm($entity);
106 106
             $editHtml = $this->formGenerator->generateForm($entity,'put');
107
-        }
108
-        else
107
+        } else
109 108
         {
110 109
             if(!$this->confirm('There is no entity for '.$this->repoName.", do you want to continue (this will disable form generator) ?"))
111 110
             {
@@ -132,8 +131,9 @@  discard block
 block discarded – undo
132 131
     function getEntity($path)
133 132
     {
134 133
         $myClass = 'App\Entities\\'.$path."\\".$this->repoName;
135
-        if(!class_exists($myClass))
136
-            return false;
134
+        if(!class_exists($myClass)) {
135
+                    return false;
136
+        }
137 137
 
138 138
         $refl = new ReflectionClass($myClass);
139 139
 
Please login to merge, or discard this patch.