Passed
Push — master ( a5e726...c16088 )
by Innocent
13:22
created
src/Services/CRUDServices.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
                 return '';
44 44
             }
45 45
 
46
-            return $this->successResponse($message ?? $this->getModelClassName(true).' deleted successfully', [], 204);
46
+            return $this->successResponse($message ?? $this->getModelClassName(true) . ' deleted successfully', [], 204);
47 47
         } catch (\Exception $e) {
48 48
             abort(500, $e->getMessage());
49 49
         }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                 return $this->getServiceVariable()->refresh();
68 68
             }
69 69
 
70
-            return $this->successResponse($message ?? $this->getModelClassName(true).' updated successfully');
70
+            return $this->successResponse($message ?? $this->getModelClassName(true) . ' updated successfully');
71 71
         } catch (\Exception $e) {
72 72
             abort(500, $e->getMessage());
73 73
         }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
                 return $model;
92 92
             }
93 93
 
94
-            return $this->successResponse($message ?? $this->getModelClassName(true).' created successfully', [], 201);
94
+            return $this->successResponse($message ?? $this->getModelClassName(true) . ' created successfully', [], 201);
95 95
         } catch (\Exception $e) {
96 96
             abort(500, $e->getMessage());
97 97
         }
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
                 return $model;
118 118
             }
119 119
 
120
-            return $this->successResponse($message ?? $this->getModelClassName(true).' created successfully', [], 201);
120
+            return $this->successResponse($message ?? $this->getModelClassName(true) . ' created successfully', [], 201);
121 121
         } catch (\Exception $e) {
122 122
             abort(500, $e->getMessage());
123 123
         }
@@ -188,9 +188,9 @@  discard block
 block discarded – undo
188 188
     private function getServiceVariable()
189 189
     {
190 190
         return collect(get_object_vars($this))
191
-            ->reject(fn($var) => ! ($var instanceof Model))
192
-            ->filter(function ($var, $key) {
193
-                return Str::contains('get'.Str::ucfirst($key), get_class_methods($this))
191
+            ->reject(fn($var) => !($var instanceof Model))
192
+            ->filter(function($var, $key) {
193
+                return Str::contains('get' . Str::ucfirst($key), get_class_methods($this))
194 194
                     && Str::startsWith(Str::lower(class_basename($this)), $key);
195 195
             })->first();
196 196
     }
Please login to merge, or discard this patch.