Completed
Push — master ( cf2713...aee5ae )
by Sherif
02:07
created
src/Modules/Core/Http/Middleware/CheckPermissions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
         $permission          = $routeActions[1];
61 61
 
62 62
         $this->auth->shouldUse('api');
63
-        if (! in_array($permission, $skipLoginCheck)) {
64
-            $this->authMiddleware->handle($request, function ($request) use ($modelName, $skipPermissionCheck, $skipLoginCheck, $permission) {
63
+        if ( ! in_array($permission, $skipLoginCheck)) {
64
+            $this->authMiddleware->handle($request, function($request) use ($modelName, $skipPermissionCheck, $skipLoginCheck, $permission) {
65 65
                 $user             = $this->auth->user();
66 66
                 $isPasswordClient = $user->token()->client->password_client;
67 67
     
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                 }
71 71
     
72 72
                 if ($isPasswordClient && (in_array($permission, $skipPermissionCheck) || $this->userService->can($permission, $modelName))) {
73
-                } elseif (! $isPasswordClient && $user->tokenCan($modelName.'-'.$permission)) {
73
+                } elseif ( ! $isPasswordClient && $user->tokenCan($modelName.'-'.$permission)) {
74 74
                 } else {
75 75
                     $this->errorHandler->noPermissions();
76 76
                 }
Please login to merge, or discard this patch.
src/Modules/Core/Services/SettingService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      */
25 25
     public function saveMany(array $data)
26 26
     {
27
-        \DB::transaction(function () use ($data) {
27
+        \DB::transaction(function() use ($data) {
28 28
             foreach ($data as $value) {
29 29
                 $this->repo->save($value);
30 30
             }
Please login to merge, or discard this patch.
src/Modules/Reporting/Database/Seeds/AssignRelationsSeeder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
         /**
19 19
          * Assign the permissions to the admin role.
20 20
          */
21
-        \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['report'])->each(function ($permission) use ($adminRoleId) {
21
+        \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['report'])->each(function($permission) use ($adminRoleId) {
22 22
             \DB::table('permission_role')->insert(
23 23
                 [
24 24
                 'permission_id' => $permission->id,
Please login to merge, or discard this patch.
src/Modules/Reporting/Services/ReportService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,9 +43,9 @@
 block discarded – undo
43 43
         /**
44 44
          * Check report existance and permission.
45 45
          */
46
-        if (! $report) {
46
+        if ( ! $report) {
47 47
             \ErrorHandler::notFound('report');
48
-        } elseif (! $skipPermission && ! $this->userService->can($report->view_name, 'report')) {
48
+        } elseif ( ! $skipPermission && ! $this->userService->can($report->view_name, 'report')) {
49 49
             \ErrorHandler::noPermissions();
50 50
         }
51 51
 
Please login to merge, or discard this patch.