Passed
Pull Request — master (#14)
by ARCANEDEV
06:41
created
src/System/ViewComposers/FoldersPermissionsComposer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
      */
69 69
     protected static function getFoldersPermissions(array $folders): array
70 70
     {
71
-        return array_map(function ($folder) {
71
+        return array_map(function($folder) {
72 72
             $path = base_path($folder);
73 73
 
74 74
             return [
Please login to merge, or discard this patch.
src/System/ViewComposers/RequiredPhpExtensionsComposer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
      */
69 69
     protected static function getRequiredExtensions(array $extensions): array
70 70
     {
71
-        return array_map(function ($extension) {
71
+        return array_map(function($extension) {
72 72
             return extension_loaded($extension);
73 73
         }, array_combine($extensions, $extensions));
74 74
     }
Please login to merge, or discard this patch.
src/Core/Providers/AuthServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     public function boot(): void
42 42
     {
43
-        Gate::after(function ($user, string $ability) {
43
+        Gate::after(function($user, string $ability) {
44 44
             /** @var  \App\Models\User  $user */
45 45
             return $user->isAdmin()
46 46
                 || $user->may($ability);
Please login to merge, or discard this patch.
src/Core/Policies/DashboardPolicy.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,8 @@
 block discarded – undo
70 70
      */
71 71
     public function index(AuthenticatedUser $user)
72 72
     {
73
-        if ($user->isModerator())
74
-            return true;
73
+        if ($user->isModerator()) {
74
+                    return true;
75
+        }
75 76
     }
76 77
 }
Please login to merge, or discard this patch.
src/Core/Http/Routes/MetricsRoutes.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@
 block discarded – undo
28 28
             $this->prefix('metrics')->name('foundation.metrics.')->group(function () {
29 29
                 // api-admin::foundation.metrics.process
30 30
                 $this->get('process', [MetricsController::class, 'process'])
31
-                     ->middleware(['ajax'])
32
-                     ->name('process');
31
+                        ->middleware(['ajax'])
32
+                        ->name('process');
33 33
             });
34 34
         });
35 35
     }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
      */
25 25
     public function map(): void
26 26
     {
27
-        $this->adminGroup(function () {
28
-            $this->prefix('metrics')->name('foundation.metrics.')->group(function () {
27
+        $this->adminGroup(function() {
28
+            $this->prefix('metrics')->name('foundation.metrics.')->group(function() {
29 29
                 // api-admin::foundation.metrics.process
30 30
                 $this->get('process', [MetricsController::class, 'process'])
31 31
                      ->middleware(['ajax'])
Please login to merge, or discard this patch.
src/Core/Http/Routes/ApiRoutes.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
             $this->prefix('api')->name('api.')->middleware(['ajax'])->group(function () {
29 29
                 $this->prefix('events')->name('events.')->group(function () {
30 30
                     $this->post('/', [EventsController::class, 'handle'])
31
-                         ->name('handle');
31
+                            ->name('handle');
32 32
                 });
33 33
             });
34 34
         });
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@
 block discarded – undo
24 24
      */
25 25
     public function map(): void
26 26
     {
27
-        $this->adminGroup(function () {
28
-            $this->prefix('api')->name('api.')->middleware(['ajax'])->group(function () {
29
-                $this->prefix('events')->name('events.')->group(function () {
27
+        $this->adminGroup(function() {
28
+            $this->prefix('api')->name('api.')->middleware(['ajax'])->group(function() {
29
+                $this->prefix('events')->name('events.')->group(function() {
30 30
                     $this->post('/', [EventsController::class, 'handle'])
31 31
                          ->name('handle');
32 32
                 });
Please login to merge, or discard this patch.
src/Core/Http/Routes/DashboardRoutes.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
         $this->adminGroup(function () {
28 28
             // admin::index
29 29
             $this->get('/', [DashboardController::class, 'index'])
30
-                 ->name('index');
30
+                    ->name('index');
31 31
         });
32 32
     }
33 33
 }
Please login to merge, or discard this 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 map(): void
26 26
     {
27
-        $this->adminGroup(function () {
27
+        $this->adminGroup(function() {
28 28
             // admin::index
29 29
             $this->get('/', [DashboardController::class, 'index'])
30 30
                  ->name('index');
Please login to merge, or discard this patch.
src/Core/Http/Middleware/EnsureIsActivated.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,8 @@
 block discarded – undo
36 36
      */
37 37
     protected function ensureUserIsActivated($user)
38 38
     {
39
-        if (is_null($user) || ! $user->isActive())
40
-            abort(403, 'Forbidden');
39
+        if (is_null($user) || ! $user->isActive()) {
40
+                    abort(403, 'Forbidden');
41
+        }
41 42
     }
42 43
 }
Please login to merge, or discard this patch.
src/Core/Http/Middleware/EnsureIsAjaxRequest.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,9 @@
 block discarded – undo
24 24
      */
25 25
     public function handle($request, Closure $next)
26 26
     {
27
-        if ( ! $this->isAjaxRequest($request))
28
-            abort(400, 'Bad Request');
27
+        if ( ! $this->isAjaxRequest($request)) {
28
+                    abort(400, 'Bad Request');
29
+        }
29 30
 
30 31
         return $next($request);
31 32
     }
Please login to merge, or discard this patch.