Completed
Push — master ( 122fa1...244647 )
by Sherif
06:20 queued 03:36
created
src/Modules/Acl/Http/Controllers/UsersController.php 2 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     /**
42 42
      * Return the logged in user account.
43 43
      * 
44
-     * @return object
44
+     * @return \Illuminate\Http\JsonResponse
45 45
      */
46 46
     public function getAccount()
47 47
     {
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     /**
53 53
      * Logout the user.
54 54
      * 
55
-     * @return void
55
+     * @return \Illuminate\Http\JsonResponse
56 56
      */
57 57
     public function getLogout()
58 58
     {
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      * Handle a registration request.
64 64
      *
65 65
      * @param  \Illuminate\Http\Request  $request
66
-     * @return \Illuminate\Http\Response
66
+     * @return \Illuminate\Http\JsonResponse
67 67
      */
68 68
     public function postRegister(Request $request)
69 69
     {
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      * Handle a login request to the application.
77 77
      *
78 78
      * @param  \Illuminate\Http\Request  $request
79
-     * @return \Illuminate\Http\Response
79
+     * @return \Illuminate\Http\JsonResponse|null
80 80
      */
81 81
     public function postLogin(Request $request)
82 82
     {
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      * Handle an assign groups to user request.
97 97
      *
98 98
      * @param  \Illuminate\Http\Request  $request
99
-     * @return \Illuminate\Http\Response
99
+     * @return \Illuminate\Http\JsonResponse
100 100
      */
101 101
     public function postAssigngroups(Request $request)
102 102
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
      * to preform actions like (add, edit ... etc).
13 13
      * @var string
14 14
      */
15
-    protected $model               = 'users';
15
+    protected $model = 'users';
16 16
 
17 17
     /**
18 18
      * List of all route actions that the base api controller
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      * to check before add.
34 34
      * @var array
35 35
      */
36
-    protected $validationRules  = [
36
+    protected $validationRules = [
37 37
     'email'    => 'required|email|unique:users,email,{id}',
38 38
     'password' => 'min:6'
39 39
     ];
Please login to merge, or discard this patch.
src/Modules/Core/AbstractRepositories/AbstractRepository.php 2 patches
Doc Comments   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      *
52 52
      * @param  array   $relations
53 53
      * @param  string  $sortBy
54
-     * @param  boolean $desc
54
+     * @param  integer $desc
55 55
      * @param  array   $columns
56 56
      * @return collection
57 57
      */
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      * @param  integer $perPage
70 70
      * @param  array   $relations
71 71
      * @param  string  $sortBy
72
-     * @param  boolean $desc
72
+     * @param  integer $desc
73 73
      * @param  array   $columns
74 74
      * @return collection
75 75
      */
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      * @param  integer $perPage
117 117
      * @param  array   $relations
118 118
      * @param  string  $sortBy
119
-     * @param  boolean $desc
119
+     * @param  integer $desc
120 120
      * @param  array   $columns
121 121
      * @return collection
122 122
      */
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      * @param  integer $perPage
135 135
      * @param  array   $relations
136 136
      * @param  string  $sortBy
137
-     * @param  boolean $desc
137
+     * @param  integer $desc
138 138
      * @param  array   $columns
139 139
      * @return collection
140 140
      */
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
      * @param  array   $conditions array of conditions
392 392
      * @param  array   $relations
393 393
      * @param  string  $sortBy
394
-     * @param  boolean $desc
394
+     * @param  integer $desc
395 395
      * @param  array   $columns
396 396
      * @return collection
397 397
      */
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
      *
409 409
      * @param  array   $conditions array of conditions
410 410
      * @param  array   $relations
411
-     * @param  array   $colunmns
411
+     * @param  array   $columns
412 412
      * @return object
413 413
      */
414 414
     public function first($conditions, $relations = [], $columns = array('*'))
@@ -452,9 +452,9 @@  discard block
 block discarded – undo
452 452
      * Abstract method that is called in after
453 453
      * the save method finish.
454 454
      * 
455
-     * @param  object  $model
455
+     * @param  boolean  $model
456 456
      * @param  array   $relations
457
-     * @return void
457
+     * @return boolean
458 458
      */
459 459
     protected function afterSave($model, $relations)
460 460
     {
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -53,26 +53,26 @@  discard block
 block discarded – undo
53 53
         $conditionColumns = $this->model->getFillable();
54 54
         $sort             = $desc ? 'desc' : 'asc';
55 55
 
56
-        $model->where(function ($q) use ($query, $conditionColumns, $relations){
57
-            $q->where(\DB::raw('LOWER(CAST(' . array_shift($conditionColumns) . ' AS TEXT))'), 'LIKE', '%' . strtolower($query) . '%');
56
+        $model->where(function($q) use ($query, $conditionColumns, $relations){
57
+            $q->where(\DB::raw('LOWER(CAST('.array_shift($conditionColumns).' AS TEXT))'), 'LIKE', '%'.strtolower($query).'%');
58 58
             foreach ($conditionColumns as $column) 
59 59
             {
60
-                $q->orWhere(\DB::raw('LOWER(CAST(' . $column . ' AS TEXT))'), 'LIKE', '%' . strtolower($query) . '%');
60
+                $q->orWhere(\DB::raw('LOWER(CAST('.$column.' AS TEXT))'), 'LIKE', '%'.strtolower($query).'%');
61 61
             }
62 62
             foreach ($relations as $relation) 
63 63
             {
64 64
                 $relation = explode('.', $relation)[0];
65 65
                 if (\Core::$relation()) 
66 66
                 {
67
-                    $q->orWhereHas($relation, function ($subModel) use ($query, $relation){
67
+                    $q->orWhereHas($relation, function($subModel) use ($query, $relation){
68 68
 
69
-                        $subModel->where(function ($q) use ($query, $relation){
69
+                        $subModel->where(function($q) use ($query, $relation){
70 70
 
71 71
                             $subConditionColumns = \Core::$relation()->model->getFillable();
72
-                            $q->where(\DB::raw('LOWER(CAST(' . array_shift($subConditionColumns) . ' AS TEXT))'), 'LIKE', '%' . strtolower($query) . '%');
72
+                            $q->where(\DB::raw('LOWER(CAST('.array_shift($subConditionColumns).' AS TEXT))'), 'LIKE', '%'.strtolower($query).'%');
73 73
                             foreach ($subConditionColumns as $column)
74 74
                             {
75
-                                $q->orWhere(\DB::raw('LOWER(CAST(' . $column . ' AS TEXT))'), 'LIKE', '%' . strtolower($query) . '%');
75
+                                $q->orWhere(\DB::raw('LOWER(CAST('.$column.' AS TEXT))'), 'LIKE', '%'.strtolower($query).'%');
76 76
                             } 
77 77
                         });
78 78
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         $relations  = [];
135 135
         $with       = [];
136 136
 
137
-        \DB::transaction(function () use (&$model, &$relations, &$with, $data, $saveLog, $modelClass) {
137
+        \DB::transaction(function() use (&$model, &$relations, &$with, $data, $saveLog, $modelClass) {
138 138
             /**
139 139
              * If the id is present in the data then select the model for updating,
140 140
              * else create new model.
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
             $model = array_key_exists('id', $data) ? $modelClass->lockForUpdate()->find($data['id']) : new $modelClass;
144 144
             if ( ! $model) 
145 145
             {
146
-                $error = \ErrorHandler::notFound(class_basename($modelClass) . ' with id : ' . $data['id']);
146
+                $error = \ErrorHandler::notFound(class_basename($modelClass).' with id : '.$data['id']);
147 147
                 abort($error['status'], $error['message']);
148 148
             }
149 149
 
@@ -175,13 +175,13 @@  discard block
 block discarded – undo
175 175
                                 $relationModel = array_key_exists('id', $val) ? $relationBaseModel->lockForUpdate()->find($val['id']) : new $relationBaseModel;
176 176
                                 if ( ! $relationModel) 
177 177
                                 {
178
-                                    $error = \ErrorHandler::notFound(class_basename($relationBaseModel) . ' with id : ' . $val['id']);
178
+                                    $error = \ErrorHandler::notFound(class_basename($relationBaseModel).' with id : '.$val['id']);
179 179
                                     abort($error['status'], $error['message']);
180 180
                                 }
181 181
 
182 182
                                 foreach ($val as $attr => $val) 
183 183
                                 {
184
-                                    if (gettype($val) !== 'object' && gettype($val) !== 'array' &&  array_search($attr, $relationModel->getFillable(), true) !== false)
184
+                                    if (gettype($val) !== 'object' && gettype($val) !== 'array' && array_search($attr, $relationModel->getFillable(), true) !== false)
185 185
                                     {
186 186
                                         $relationModel->$attr = $val;
187 187
                                     }
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
                                     $relationModel = array_key_exists('id', $value) ? $relationBaseModel->lockForUpdate()->find($value['id']) : new $relationBaseModel;
196 196
                                     if ( ! $relationModel) 
197 197
                                     {
198
-                                        $error = \ErrorHandler::notFound(class_basename($relationBaseModel) . ' with id : ' . $value['id']);
198
+                                        $error = \ErrorHandler::notFound(class_basename($relationBaseModel).' with id : '.$value['id']);
199 199
                                         abort($error['status'], $error['message']);
200 200
                                     }
201 201
 
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
     public function saveMany(array $data)
284 284
     {
285 285
         $result = [];
286
-        \DB::transaction(function () use (&$result, $data) {
286
+        \DB::transaction(function() use (&$result, $data) {
287 287
             foreach ($data as $key => $value) 
288 288
             {
289 289
                 $result[] = $this->save($value);
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
             $model ? $model->update($data) : 0;
310 310
             $saveLog ? \Logging::saveLog('update', class_basename($this->model), $this->getModel(), $value, $model) : false;
311 311
         }
312
-    	call_user_func_array("{$this->getModel()}::where", array($attribute, '=', $value))->lockForUpdate()->get()->each(function ($model) use ($data, $saveLog){
312
+    	call_user_func_array("{$this->getModel()}::where", array($attribute, '=', $value))->lockForUpdate()->get()->each(function($model) use ($data, $saveLog){
313 313
             $model->update($data);
314 314
             $saveLog ? \Logging::saveLog('update', class_basename($this->model), $this->getModel(), $model->id, $model) : false;
315 315
         });
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
     {
328 328
     	if ($attribute == 'id') 
329 329
     	{
330
-            \DB::transaction(function () use ($value, $attribute, &$result, $saveLog) {
330
+            \DB::transaction(function() use ($value, $attribute, &$result, $saveLog) {
331 331
                 $model = $this->model->lockForUpdate()->find($value);
332 332
                 $model->delete();
333 333
                 $saveLog ? \Logging::saveLog('delete', class_basename($this->model), $this->getModel(), $value, $model) : false;
@@ -335,8 +335,8 @@  discard block
 block discarded – undo
335 335
     	}
336 336
         else
337 337
         {
338
-            \DB::transaction(function () use ($value, $attribute, &$result, $saveLog) {
339
-                call_user_func_array("{$this->getModel()}::where", array($attribute, '=', $value))->lockForUpdate()->get()->each(function ($model){
338
+            \DB::transaction(function() use ($value, $attribute, &$result, $saveLog) {
339
+                call_user_func_array("{$this->getModel()}::where", array($attribute, '=', $value))->lockForUpdate()->get()->each(function($model) {
340 340
                     $model->delete();
341 341
                     $saveLog ? \Logging::saveLog('delete', class_basename($this->model), $this->getModel(), $model->id, $model) : false;
342 342
                 });
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
     {
374 374
         $conditions = $this->constructConditions($conditions);
375 375
         $sort       = $desc ? 'desc' : 'asc';
376
-        return call_user_func_array("{$this->getModel()}::with",  array($relations))->whereRaw($conditions['conditionString'], $conditions['conditionValues'])->orderBy($sortBy, $sort)->get($columns);
376
+        return call_user_func_array("{$this->getModel()}::with", array($relations))->whereRaw($conditions['conditionString'], $conditions['conditionValues'])->orderBy($sortBy, $sort)->get($columns);
377 377
     }
378 378
 
379 379
     /**
@@ -404,21 +404,21 @@  discard block
 block discarded – undo
404 404
         {
405 405
             if ($key == 'and') 
406 406
             {
407
-                $conditionString  .= str_replace('{op}', 'and', $this->constructConditions($value)['conditionString']) . ' {op} ';
407
+                $conditionString  .= str_replace('{op}', 'and', $this->constructConditions($value)['conditionString']).' {op} ';
408 408
                 $conditionValues   = array_merge($conditionValues, $this->constructConditions($value)['conditionValues']);
409 409
             }
410 410
             else if ($key == 'or')
411 411
             {
412
-                $conditionString  .= str_replace('{op}', 'or', $this->constructConditions($value)['conditionString']) . ' {op} ';
412
+                $conditionString  .= str_replace('{op}', 'or', $this->constructConditions($value)['conditionString']).' {op} ';
413 413
                 $conditionValues   = array_merge($conditionValues, $this->constructConditions($value)['conditionValues']);
414 414
             }
415 415
             else
416 416
             {
417
-                $conditionString  .= $key . '=? {op} ';
417
+                $conditionString  .= $key.'=? {op} ';
418 418
                 $conditionValues[] = $value;
419 419
             }
420 420
         }
421
-        $conditionString = '(' . rtrim($conditionString, '{op} ') . ')';
421
+        $conditionString = '('.rtrim($conditionString, '{op} ').')';
422 422
         return ['conditionString' => $conditionString, 'conditionValues' => $conditionValues];
423 423
     }
424 424
 
Please login to merge, or discard this patch.
src/Modules/Core/Http/Controllers/BaseApiController.php 2 patches
Doc Comments   +13 added lines, -15 removed lines patch added patch discarded remove patch
@@ -54,9 +54,7 @@  discard block
 block discarded – undo
54 54
     /**
55 55
      * Fetch all records with relations from model repository.
56 56
      * 
57
-     * @param  string  $sortBy
58
-     * @param  boolean $desc
59
-     * @return \Illuminate\Http\Response
57
+     * @return \Illuminate\Http\JsonResponse|null
60 58
      */
61 59
     public function getIndex() 
62 60
     {
@@ -71,7 +69,7 @@  discard block
 block discarded – undo
71 69
      * Fetch the single object with relations from model repository.
72 70
      * 
73 71
      * @param  integer $id
74
-     * @return \Illuminate\Http\Response
72
+     * @return \Illuminate\Http\JsonResponse|null
75 73
      */
76 74
     public function getFind($id) 
77 75
     {
@@ -89,8 +87,8 @@  discard block
 block discarded – undo
89 87
      * @param  string  $query
90 88
      * @param  integer $perPage
91 89
      * @param  string  $sortBy
92
-     * @param  boolean $desc
93
-     * @return \Illuminate\Http\Response
90
+     * @param  integer $desc
91
+     * @return \Illuminate\Http\JsonResponse|null
94 92
      */
95 93
     public function getSearch($query = '', $perPage = 15, $sortBy = 'created_at', $desc = 1) 
96 94
     {
@@ -107,8 +105,8 @@  discard block
 block discarded – undo
107 105
      * 
108 106
      * @param  \Illuminate\Http\Request  $request
109 107
      * @param  string  $sortBy
110
-     * @param  boolean $desc
111
-     * @return \Illuminate\Http\Response
108
+     * @param  integer $desc
109
+     * @return \Illuminate\Http\JsonResponse|null
112 110
      */
113 111
     public function postFindby(Request $request, $sortBy = 'created_at', $desc = 1) 
114 112
     {
@@ -124,7 +122,7 @@  discard block
 block discarded – undo
124 122
      * condition.
125 123
      * 
126 124
      * @param  \Illuminate\Http\Request  $request
127
-     * @return \Illuminate\Http\Response
125
+     * @return \Illuminate\Http\JsonResponse|null
128 126
      */
129 127
     public function postFirst(Request $request) 
130 128
     {
@@ -140,8 +138,8 @@  discard block
 block discarded – undo
140 138
      * 
141 139
      * @param  integer $perPage
142 140
      * @param  string  $sortBy
143
-     * @param  boolean $desc
144
-     * @return \Illuminate\Http\Response
141
+     * @param  integer $desc
142
+     * @return \Illuminate\Http\JsonResponse|null
145 143
      */
146 144
     public function getPaginate($perPage = 15, $sortBy = 'created_at', $desc = 1) 
147 145
     {
@@ -159,8 +157,8 @@  discard block
 block discarded – undo
159 157
      * @param  \Illuminate\Http\Request  $request
160 158
      * @param  integer $perPage
161 159
      * @param  string  $sortBy
162
-     * @param  boolean $desc
163
-     * @return \Illuminate\Http\Response
160
+     * @param  integer $desc
161
+     * @return \Illuminate\Http\JsonResponse|null
164 162
      */
165 163
     public function postPaginateby(Request $request, $perPage = 15, $sortBy = 'created_at', $desc = 1) 
166 164
     {
@@ -175,7 +173,7 @@  discard block
 block discarded – undo
175 173
      * Save the given model to repository.
176 174
      * 
177 175
      * @param  \Illuminate\Http\Request  $request
178
-     * @return \Illuminate\Http\Response
176
+     * @return \Illuminate\Http\JsonResponse|null
179 177
      */
180 178
     public function postSave(Request $request) 
181 179
     {
@@ -208,7 +206,7 @@  discard block
 block discarded – undo
208 206
      * Delete by the given id from model repository.
209 207
      * 
210 208
      * @param  integer  $id
211
-     * @return \Illuminate\Http\Response
209
+     * @return \Illuminate\Http\JsonResponse|null
212 210
      */
213 211
     public function getDelete($id) 
214 212
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         $this->skipLoginCheck      = property_exists($this, 'skipLoginCheck') ? $this->skipLoginCheck : [];
48 48
         
49 49
         $this->relations           = array_key_exists($this->model, $this->config['relations']) ? $this->config['relations'][$this->model] : false;
50
-        $route                     = explode('@',\Route::currentRouteAction())[1];
50
+        $route                     = explode('@', \Route::currentRouteAction())[1];
51 51
         $this->checkPermission(explode('_', snake_case($route))[1]);
52 52
     }
53 53
 
Please login to merge, or discard this patch.
src/Modules/Core/Interfaces/RepositoryInterface.php 1 patch
Doc Comments   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
      * 
8 8
      * @param  array  $relations
9 9
      * @param  array   $sortBy
10
-     * @param  array   $desc
10
+     * @param  integer   $desc
11 11
      * @param  array  $columns
12 12
      * @return collection
13 13
      */
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      * @param  integer $perPage
22 22
      * @param  array   $relations
23 23
      * @param  array   $sortBy
24
-     * @param  array   $desc
24
+     * @param  integer   $desc
25 25
      * @param  array   $columns
26 26
      * @return collection
27 27
      */
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      * @param  integer $perPage
34 34
      * @param  array   $relations
35 35
      * @param  array   $sortBy
36
-     * @param  array   $desc
36
+     * @param  integer   $desc
37 37
      * @param  array   $columns
38 38
      * @return collection
39 39
      */
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      * @param  integer $perPage
48 48
      * @param  array   $relations
49 49
      * @param  array   $sortBy
50
-     * @param  array   $desc
50
+     * @param  integer   $desc
51 51
      * @param  array   $columns
52 52
      * @return collection
53 53
      */
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      * @param  array   $conditions array of conditions
110 110
      * @param  array   $relations
111 111
      * @param  array   $sortBy
112
-     * @param  array   $desc
112
+     * @param  integer   $desc
113 113
      * @param  array   $columns
114 114
      * @return collection
115 115
      */
@@ -120,7 +120,6 @@  discard block
 block discarded – undo
120 120
      * condition.
121 121
      * 
122 122
      * @param  array   $conditions array of conditions
123
-     * @param  [type]  $value condition value
124 123
      * @param  array   $relations
125 124
      * @param  array   $columns
126 125
      * @return object
Please login to merge, or discard this patch.
src/Modules/Acl/AclGroup.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 use Illuminate\Database\Eloquent\Model;
4 4
 use Illuminate\Database\Eloquent\SoftDeletes;
5 5
 
6
-class AclGroup extends Model{
6
+class AclGroup extends Model {
7 7
 
8 8
     use SoftDeletes;
9 9
     protected $table    = 'groups';
@@ -29,12 +29,12 @@  discard block
 block discarded – undo
29 29
 
30 30
     public function users()
31 31
     {
32
-        return $this->belongsToMany('\App\Modules\Acl\AclUser','users_groups','group_id','user_id')->whereNull('users_groups.deleted_at')->withTimestamps();
32
+        return $this->belongsToMany('\App\Modules\Acl\AclUser', 'users_groups', 'group_id', 'user_id')->whereNull('users_groups.deleted_at')->withTimestamps();
33 33
     }
34 34
 
35 35
     public function permissions()
36 36
     {
37
-        return $this->belongsToMany('\App\Modules\Acl\AclPermission','groups_permissions','group_id','permission_id')->whereNull('groups_permissions.deleted_at')->withTimestamps();
37
+        return $this->belongsToMany('\App\Modules\Acl\AclPermission', 'groups_permissions', 'group_id', 'permission_id')->whereNull('groups_permissions.deleted_at')->withTimestamps();
38 38
     }
39 39
 
40 40
     public static function boot()
Please login to merge, or discard this patch.
src/Modules/Acl/Repositories/UserRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,11 +23,11 @@  discard block
 block discarded – undo
23 23
 	 * @param  boolean $user
24 24
 	 * @return boolean
25 25
 	 */
26
-	public function can($nameOfPermission, $model, $user = false )
26
+	public function can($nameOfPermission, $model, $user = false)
27 27
 	{		
28 28
 		$user        = $user ?: \Auth::user();
29 29
 		$permissions = [];
30
-		\Core::users()->find($user->id, ['groups.permissions'])->groups->lists('permissions')->each(function ($permission) use (&$permissions, $model){
30
+		\Core::users()->find($user->id, ['groups.permissions'])->groups->lists('permissions')->each(function($permission) use (&$permissions, $model){
31 31
 			$permissions = array_merge($permissions, $permission->where('model', $model)->lists('name')->toArray()); 
32 32
 		});
33 33
 		
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 */
56 56
 	public function assignGroups($user_id, $group_ids)
57 57
 	{
58
-		\DB::transaction(function () use ($user_id, $group_ids) {
58
+		\DB::transaction(function() use ($user_id, $group_ids) {
59 59
 			$user = \Core::users()->find($user_id);
60 60
 			$user->groups()->detach();
61 61
 			$user->groups()->attach($group_ids);
Please login to merge, or discard this patch.
src/Modules/Acl/Repositories/GroupRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 	 */
24 24
 	public function assignPermissions($group_id, $permission_ids)
25 25
 	{
26
-		\DB::transaction(function () use ($group_id, $permission_ids) {
26
+		\DB::transaction(function() use ($group_id, $permission_ids) {
27 27
 			$group = \Core::groups()->find($group_id);
28 28
 			$group->permissions()->detach();
29 29
 			$group->permissions()->attach($permission_ids);
Please login to merge, or discard this patch.
src/Modules/Acl/Http/Controllers/GroupsController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,14 +13,14 @@
 block discarded – undo
13 13
      * to preform actions like (add, edit ... etc).
14 14
      * @var string
15 15
      */
16
-    protected $model               = 'groups';
16
+    protected $model = 'groups';
17 17
 
18 18
     /**
19 19
      * The validations rules used by the base api controller
20 20
      * to check before add.
21 21
      * @var array
22 22
      */
23
-    protected $validationRules  = [
23
+    protected $validationRules = [
24 24
     'name' => 'required|string|max:100|unique:groups,name,{id}'
25 25
     ];
26 26
 
Please login to merge, or discard this patch.
src/Modules/Acl/Database/Migrations/2015_12_20_124153_users.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,11 +12,11 @@
 block discarded – undo
12 12
 	 */
13 13
 	public function up()
14 14
 	{
15
-		Schema::create('users', function (Blueprint $table) {
15
+		Schema::create('users', function(Blueprint $table) {
16 16
             $table->increments('id');
17
-            $table->string('first_name',100)->nullable();
18
-            $table->string('last_name',100)->nullable();
19
-            $table->string('user_name',100)->nullable();
17
+            $table->string('first_name', 100)->nullable();
18
+            $table->string('last_name', 100)->nullable();
19
+            $table->string('user_name', 100)->nullable();
20 20
             $table->text('address')->nullable();
21 21
             $table->string('email')->unique();
22 22
             $table->string('password', 60);
Please login to merge, or discard this patch.