Completed
Push — master ( 2f9ece...c4baa4 )
by Sherif
05:12 queued 45s
created
src/Exceptions/Handler.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@
 block discarded – undo
51 51
             if ($e instanceof \Illuminate\Database\QueryException) 
52 52
             {
53 53
                 return \Response::json('Please check the given inputes', '400');
54
-            }
55
-            else if ($e instanceof \predis\connection\connectionexception) 
54
+            } else if ($e instanceof \predis\connection\connectionexception) 
56 55
             {
57 56
                 return \Response::json('Your redis notification server isn\'t running', '400');
58 57
             }
Please login to merge, or discard this patch.
src/Modules/Acl/Http/Controllers/UsersController.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,8 +84,7 @@
 block discarded – undo
84 84
         {
85 85
             $relations = $this->relations && $this->relations['find'] ? $this->relations['find'] : [];
86 86
             return \Response::json(call_user_func_array("\Core::{$this->model}", [])->find(\Auth::id(), $relations), 200);
87
-        }
88
-        else
87
+        } else
89 88
         {
90 89
             $error = $this->errorHandler->loginFailed();
91 90
             abort($error['status'], $error['message']);
Please login to merge, or discard this patch.
src/Modules/Core/AbstractRepositories/AbstractRepository.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -213,8 +213,7 @@  discard block
 block discarded – undo
213 213
                                     }
214 214
                                 }
215 215
                                 $relations[$relation][] = $relationModel;
216
-                            }
217
-                            else
216
+                            } else
218 217
                             {
219 218
                                 if (gettype($val) !== 'object' && gettype($val) !== 'array') 
220 219
                                 {
@@ -234,8 +233,7 @@  discard block
 block discarded – undo
234 233
                             }
235 234
                         }
236 235
                     }
237
-                }
238
-                else if (array_search($key, $model->getFillable(), true) !== false)
236
+                } else if (array_search($key, $model->getFillable(), true) !== false)
239 237
                 {
240 238
                     $model->$key = $value;   
241 239
                 }
@@ -247,8 +245,7 @@  discard block
 block discarded – undo
247 245
                 if ($value == 'delete' && $model->$key()->count())
248 246
                 {
249 247
                     $model->$key()->delete();
250
-                }
251
-                else if (gettype($value) == 'array') 
248
+                } else if (gettype($value) == 'array') 
252 249
                 {
253 250
                     $ids = [];
254 251
                     foreach ($value as $val) 
@@ -279,8 +276,7 @@  discard block
 block discarded – undo
279 276
                             $model->$key()->attach($ids);
280 277
                             break;
281 278
                     }
282
-                }
283
-                else
279
+                } else
284 280
                 {
285 281
                     switch (class_basename($model->$key())) 
286 282
                     {
@@ -358,8 +354,7 @@  discard block
 block discarded – undo
358 354
                 $model->delete();
359 355
                 $saveLog ? $this->logs->saveLog('delete', class_basename($this->model), $this->getModel(), $value, $model) : false;
360 356
             });
361
-    	}
362
-        else
357
+    	} else
363 358
         {
364 359
             \DB::transaction(function () use ($value, $attribute, &$result, $saveLog) {
365 360
                 call_user_func_array("{$this->getModel()}::where", array($attribute, '=', $value))->lockForUpdate()->get()->each(function ($model){
@@ -432,13 +427,11 @@  discard block
 block discarded – undo
432 427
             {
433 428
                 $conditionString  .= str_replace('{op}', 'and', $this->constructConditions($value)['conditionString']) . ' {op} ';
434 429
                 $conditionValues   = array_merge($conditionValues, $this->constructConditions($value)['conditionValues']);
435
-            }
436
-            else if ($key == 'or')
430
+            } else if ($key == 'or')
437 431
             {
438 432
                 $conditionString  .= str_replace('{op}', 'or', $this->constructConditions($value)['conditionString']) . ' {op} ';
439 433
                 $conditionValues   = array_merge($conditionValues, $this->constructConditions($value)['conditionValues']);
440
-            }
441
-            else
434
+            } else
442 435
             {
443 436
                 $conditionString  .= $key . '=? {op} ';
444 437
                 $conditionValues[] = $value;
Please login to merge, or discard this patch.
src/Modules/Core/Http/Controllers/BaseApiController.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -189,8 +189,7 @@  discard block
 block discarded – undo
189 189
             if ($request->has('id')) 
190 190
             {
191 191
                 $rule = str_replace('{id}', $request->get('id'), $rule);
192
-            }
193
-            else
192
+            } else
194 193
             {
195 194
                 $rule = str_replace(',{id}', '', $rule);
196 195
             }
@@ -231,15 +230,13 @@  discard block
 block discarded – undo
231 230
         {
232 231
             $error = $this->errorHandler->notFound('method');
233 232
             abort($error['status'], $error['message']);
234
-        }
235
-        else if ( ! in_array($permission, $this->skipLoginCheck)) 
233
+        } else if ( ! in_array($permission, $this->skipLoginCheck)) 
236 234
         {
237 235
             if ( ! \Auth::check()) 
238 236
             {
239 237
                 $error = $this->errorHandler->unAuthorized();
240 238
                 abort($error['status'], $error['message']);
241
-            }
242
-            else if ( ! in_array($permission, $this->skipPermissionCheck) && 
239
+            } else if ( ! in_array($permission, $this->skipPermissionCheck) && 
243 240
                       ! \Core::users()->can($permission, $this->model))
244 241
             {
245 242
                 $error = $this->errorHandler->noPermissions();
Please login to merge, or discard this patch.