Completed
Push — master ( e18cb5...b1a815 )
by Sherif
02:01
created
src/Modules/Core/BaseClasses/BaseRepository.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function __construct($model)
23 23
     {
24
-        $this->model  = $model;
24
+        $this->model = $model;
25 25
     }
26 26
 
27 27
     /**
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $model      = false;
87 87
         $relations  = [];
88 88
 
89
-        \DB::transaction(function () use (&$model, &$relations, $data) {
89
+        \DB::transaction(function() use (&$model, &$relations, $data) {
90 90
             
91 91
             $model     = $this->prepareModel($data);
92 92
             $relations = $this->prepareRelations($data, $model);
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
      */
111 111
     public function delete($value, $attribute = 'id')
112 112
     {
113
-        \DB::transaction(function () use ($value, $attribute) {
114
-            $this->model->where($attribute, '=', $value)->lockForUpdate()->get()->each(function ($model) {
113
+        \DB::transaction(function() use ($value, $attribute) {
114
+            $this->model->where($attribute, '=', $value)->lockForUpdate()->get()->each(function($model) {
115 115
                 $model->delete();
116 116
             });
117 117
         });
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
     {
202 202
         $model = $this->model->onlyTrashed()->find($id);
203 203
 
204
-        if (! $model) {
204
+        if ( ! $model) {
205 205
             \Errors::notFound(class_basename($this->model).' with id : '.$id);
206 206
         }
207 207
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
          * @var array
226 226
          */
227 227
         $model = Arr::has($data, 'id') ? $modelClass->lockForUpdate()->find($data['id']) : new $modelClass;
228
-        if (! $model) {
228
+        if ( ! $model) {
229 229
             \Errors::notFound(class_basename($modelClass).' with id : '.$data['id']);
230 230
         }
231 231
 
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
                      * If the relation has no value then marke the relation data
283 283
                      * related to the model to be deleted.
284 284
                      */
285
-                    if (! $value || ! count($value)) {
285
+                    if ( ! $value || ! count($value)) {
286 286
                         $relations[$relation] = 'delete';
287 287
                     }
288 288
                 }
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
                             /**
310 310
                              * If model doesn't exists.
311 311
                              */
312
-                            if (! $relationModel) {
312
+                            if ( ! $relationModel) {
313 313
                                 \Errors::notFound(class_basename($relationBaseModel).' with id : '.$val['id']);
314 314
                             }
315 315
 
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
                                 /**
341 341
                                  * If model doesn't exists.
342 342
                                  */
343
-                                if (! $relationModel) {
343
+                                if ( ! $relationModel) {
344 344
                                     \Errors::notFound(class_basename($relationBaseModel).' with id : '.$value['id']);
345 345
                                 }
346 346
 
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
         $value      = $removeLast === false ? $value : substr($value, 0, $removeLast);
547 547
         $path       = explode('->', $value);
548 548
         $field      = array_shift($path);
549
-        $result     = sprintf('%s->\'$.%s\'', $field, collect($path)->map(function ($part) {
549
+        $result     = sprintf('%s->\'$.%s\'', $field, collect($path)->map(function($part) {
550 550
             return '"'.$part.'"';
551 551
         })->implode('.'));
552 552
         
Please login to merge, or discard this patch.
src/Modules/OauthClients/Routes/api.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 |
12 12
 */
13 13
 
14
-Route::group(['prefix' => 'oauth/clients'], function () {
14
+Route::group(['prefix' => 'oauth/clients'], function() {
15 15
 
16 16
     Route::get('/', 'OauthClientController@index');
17 17
     Route::get('{id}', 'OauthClientController@show');
Please login to merge, or discard this patch.
src/Modules/Permissions/Routes/api.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 |
14 14
 */
15 15
 
16
-Route::group(['prefix' => 'permissions'], function () {
16
+Route::group(['prefix' => 'permissions'], function() {
17 17
         
18 18
     Route::get('/', 'PermissionController@index');
19 19
     Route::get('/{id}', 'PermissionController@show');
Please login to merge, or discard this patch.
src/Modules/Reporting/Routes/api.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 |
12 12
 */
13 13
 
14
-Route::group(['prefix' => 'reports'], function () {
14
+Route::group(['prefix' => 'reports'], function() {
15 15
         
16 16
     Route::get('/', 'ReportController@index');
17 17
     Route::get('/{id}', 'ReportController@show');
Please login to merge, or discard this patch.
src/Modules/PushNotificationDevices/Routes/api.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 |
14 14
 */
15 15
 
16
-Route::group(['prefix' => 'push/notification/devices'], function () {
16
+Route::group(['prefix' => 'push/notification/devices'], function() {
17 17
         
18 18
     Route::get('/', 'PushNotificationDeviceController@index');
19 19
     Route::get('{id}', 'PushNotificationDeviceController@show');
Please login to merge, or discard this patch.
src/Modules/Core/Console/Commands/Stubs/Module/Routes/api.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 |
14 14
 */
15 15
 
16
-Route::group(['prefix' => 'DummyRoutePrefix'], function () {
16
+Route::group(['prefix' => 'DummyRoutePrefix'], function() {
17 17
 
18 18
     Route::get('/', 'DummyController@index');
19 19
     Route::get('{id}', 'DummyController@show');
Please login to merge, or discard this patch.
src/Modules/Core/Routes/api.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 |
12 12
 */
13 13
 
14
-Route::group(['prefix' => 'settings'], function () {
14
+Route::group(['prefix' => 'settings'], function() {
15 15
 
16 16
     Route::get('/', 'SettingController@index');
17 17
     Route::get('{id}', 'SettingController@show');
Please login to merge, or discard this patch.
src/Modules/Roles/Routes/api.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 |
14 14
 */
15 15
 
16
-Route::group(['prefix' => 'roles'], function () {
16
+Route::group(['prefix' => 'roles'], function() {
17 17
 
18 18
     Route::get('/', 'RoleController@index');
19 19
     Route::get('{id}', 'RoleController@show');
Please login to merge, or discard this patch.
src/Modules/Users/Routes/api.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 |
14 14
 */
15 15
 
16
-Route::group(['prefix' => 'users'], function () {
16
+Route::group(['prefix' => 'users'], function() {
17 17
     
18 18
     Route::get('/', 'UserController@index');
19 19
     Route::get('{id}', 'UserController@show');
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     Route::patch('{id}/unblock', 'UserController@unblock');
26 26
     Route::patch('{id}/assign/roles', 'UserController@assignRoles');
27 27
 
28
-    Route::group(['prefix' => 'account'], function () {
28
+    Route::group(['prefix' => 'account'], function() {
29 29
 
30 30
         Route::get('my', 'UserController@account');
31 31
         Route::get('logout', 'UserController@logout');
Please login to merge, or discard this patch.