Completed
Push — master ( fbdce5...2e36c4 )
by Sherif
08:54
created
src/Modules/Core/Database/Factories/SettingFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-$factory->define(App\Modules\Core\Setting::class, function (Faker\Generator $faker) {
3
+$factory->define(App\Modules\Core\Setting::class, function(Faker\Generator $faker) {
4 4
     return [
5 5
         'name'       => $faker->randomElement(['Company Name', 'Title', 'Header Image']),
6 6
         'value'      => $faker->word(),
Please login to merge, or discard this patch.
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->core->users()->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/Console/Commands/GenerateDoc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      */
84 84
     protected function getRoutes()
85 85
     {
86
-        return collect(\Route::getRoutes())->map(function ($route) {
86
+        return collect(\Route::getRoutes())->map(function($route) {
87 87
             if (strpos($route->uri(), 'api/') !== false) {
88 88
                 return [
89 89
                     'method' => $route->methods()[0],
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         ];
115 115
 
116 116
 
117
-        if (! $skipLoginCheck || ! in_array($method, $skipLoginCheck)) {
117
+        if ( ! $skipLoginCheck || ! in_array($method, $skipLoginCheck)) {
118 118
             $route['headers']['Authorization'] = 'Bearer {token}';
119 119
         }
120 120
     }
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         if (count($parameters)) {
163 163
             $className = optional($reflectionMethod->getParameters()[0]->getType())->getName();
164 164
             if ($className) {
165
-                $reflectionClass  = new \ReflectionClass($className);
165
+                $reflectionClass = new \ReflectionClass($className);
166 166
     
167 167
                 if ($reflectionClass->hasMethod('rules')) {
168 168
                     $reflectionMethod = $reflectionClass->getMethod('rules');
Please login to merge, or discard this patch.