Passed
Pull Request — master (#14)
by ARCANEDEV
08:52
created
src/System/Http/Routes/DependenciesRoutes.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 map(): void
26 26
     {
27
-        $this->prefix('dependencies')->name('dependencies.')->group(function () {
27
+        $this->prefix('dependencies')->name('dependencies.')->group(function() {
28 28
             // admin::system.dependencies.index
29 29
             $this->get('/', [DependenciesController::class, 'index'])
30 30
                 ->name('index');
Please login to merge, or discard this patch.
src/System/Http/Routes/RoutesViewerRoutes.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->prefix('routes-viewer')->name('routes-viewer.')->group(function () {
28 28
             // admin::system.routes-viewer.index
29 29
             $this->get('/', [RoutesViewerController::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->prefix('routes-viewer')->name('routes-viewer.')->group(function () {
27
+        $this->prefix('routes-viewer')->name('routes-viewer.')->group(function() {
28 28
             // admin::system.routes-viewer.index
29 29
             $this->get('/', [RoutesViewerController::class, 'index'])
30 30
                  ->name('index');
Please login to merge, or discard this patch.
src/System/Http/Routes/AbilitiesRoutes.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 map(): void
26 26
     {
27
-        $this->prefix('abilities')->name('abilities.')->group(function () {
27
+        $this->prefix('abilities')->name('abilities.')->group(function() {
28 28
             // admin::system.abilities.index
29 29
             $this->get('/', [AbilitiesController::class, 'index'])
30 30
                 ->name('index');
Please login to merge, or discard this patch.
src/System/Http/Routes/MaintenanceRoutes.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,15 +27,15 @@
 block discarded – undo
27 27
         $this->prefix('maintenance')->name('maintenance.')->group(function () {
28 28
             // admin::system.maintenance.index
29 29
             $this->get('/', [MaintenanceController::class, 'index'])
30
-                 ->name('index');
30
+                    ->name('index');
31 31
 
32 32
             // admin::system.maintenance.start
33 33
             $this->post('start', [MaintenanceController::class, 'start'])
34
-                 ->name('start');
34
+                    ->name('start');
35 35
 
36 36
             // admin::system.maintenance.stop
37 37
             $this->post('stop', [MaintenanceController::class, 'stop'])
38
-                 ->name('stop');
38
+                    ->name('stop');
39 39
         });
40 40
     }
41 41
 }
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->prefix('maintenance')->name('maintenance.')->group(function () {
27
+        $this->prefix('maintenance')->name('maintenance.')->group(function() {
28 28
             // admin::system.maintenance.index
29 29
             $this->get('/', [MaintenanceController::class, 'index'])
30 30
                  ->name('index');
Please login to merge, or discard this patch.
src/System/Http/Routes/LogViewerRoutes.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,31 +27,31 @@
 block discarded – undo
27 27
         $this->prefix('log-viewer')->name('log-viewer.')->group(function () {
28 28
             // admin::system.log-viewer.index
29 29
             $this->get('/', [LogViewerController::class, 'index'])
30
-                 ->name('index');
30
+                    ->name('index');
31 31
 
32 32
             $this->prefix('logs')->name('logs.')->group(function () {
33 33
                 $this->prefix('{admin_log_file_date}')->group(function () {
34 34
                     // admin::system.log-viewer.logs.show
35 35
                     $this->get('/', [LogViewerController::class, 'showLog'])
36
-                         ->name('show');
36
+                            ->name('show');
37 37
 
38 38
                     // admin::system.log-viewer.logs.download
39 39
                     $this->get('download', [LogViewerController::class, 'download'])
40
-                         ->name('download');
40
+                            ->name('download');
41 41
 
42 42
                     // admin::system.log-viewer.logs.delete
43 43
                     $this->delete('delete', [LogViewerController::class, 'delete'])
44
-                         ->middleware(['ajax'])
45
-                         ->name('delete');
44
+                            ->middleware(['ajax'])
45
+                            ->name('delete');
46 46
 
47 47
                     $this->prefix('{admin_log_level}')->group(function () {
48 48
                         // admin::system.log-viewer.logs.filter
49 49
                         $this->get('/', [LogViewerController::class, 'filter'])
50
-                             ->name('filter');
50
+                                ->name('filter');
51 51
 
52 52
                         // admin::system.log-viewer.logs.search
53 53
                         $this->get('search', [LogViewerController::class, 'search'])
54
-                             ->name('search');
54
+                                ->name('search');
55 55
                     });
56 56
                 });
57 57
             });
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,13 +24,13 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function map(): void
26 26
     {
27
-        $this->prefix('log-viewer')->name('log-viewer.')->group(function () {
27
+        $this->prefix('log-viewer')->name('log-viewer.')->group(function() {
28 28
             // admin::system.log-viewer.index
29 29
             $this->get('/', [LogViewerController::class, 'index'])
30 30
                  ->name('index');
31 31
 
32
-            $this->prefix('logs')->name('logs.')->group(function () {
33
-                $this->prefix('{admin_log_file_date}')->group(function () {
32
+            $this->prefix('logs')->name('logs.')->group(function() {
33
+                $this->prefix('{admin_log_file_date}')->group(function() {
34 34
                     // admin::system.log-viewer.logs.show
35 35
                     $this->get('/', [LogViewerController::class, 'showLog'])
36 36
                          ->name('show');
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
                          ->middleware(['ajax'])
45 45
                          ->name('delete');
46 46
 
47
-                    $this->prefix('{admin_log_level}')->group(function () {
47
+                    $this->prefix('{admin_log_level}')->group(function() {
48 48
                         // admin::system.log-viewer.logs.filter
49 49
                         $this->get('/', [LogViewerController::class, 'filter'])
50 50
                              ->name('filter');
Please login to merge, or discard this patch.
src/System/Http/Requests/MaintenanceMode/StartMaintenanceModeRequest.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,8 +74,9 @@
 block discarded – undo
74 74
     {
75 75
         $ips = explode(PHP_EOL, (string) $this->input('allowed'));
76 76
 
77
-        if ((bool) $this->input('allow_current_ip'))
78
-            $ips[] = $this->ip();
77
+        if ((bool) $this->input('allow_current_ip')) {
78
+                    $ips[] = $this->ip();
79
+        }
79 80
 
80 81
         return array_unique(array_filter($ips));
81 82
     }
Please login to merge, or discard this patch.
src/System/Views/Components/DependenciesDatatable.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
     private function getResults(PackageManifest $manifest): LengthAwarePaginator
85 85
     {
86 86
         $packages = $manifest->installed()
87
-            ->unless(empty($this->search), function (Collection $items) {
88
-                return $items->filter(function ($package) {
87
+            ->unless(empty($this->search), function(Collection $items) {
88
+                return $items->filter(function($package) {
89 89
                     $needles   = explode(' ', Str::lower($this->search));
90 90
                     $haystacks = [
91 91
                         $package['name'],
@@ -99,13 +99,13 @@  discard block
 block discarded – undo
99 99
                     return false;
100 100
                 });
101 101
             })
102
-            ->sortBy(function ($package) {
102
+            ->sortBy(function($package) {
103 103
                 if ($this->sortField === 'name')
104 104
                     return $package['name'];
105 105
 
106 106
                 return $package['name'];
107 107
             }, SORT_REGULAR, ! $this->sortAsc)
108
-            ->transform(function ($package) {
108
+            ->transform(function($package) {
109 109
                 return $package + [
110 110
                     'key' => str_replace('/', '+', $package['name']),
111 111
                 ];
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -92,16 +92,18 @@
 block discarded – undo
92 92
                     ];
93 93
 
94 94
                     foreach ($haystacks as $haystack) {
95
-                        if (Str::contains(Str::lower($haystack), $needles))
96
-                            return true;
95
+                        if (Str::contains(Str::lower($haystack), $needles)) {
96
+                                                    return true;
97
+                        }
97 98
                     }
98 99
 
99 100
                     return false;
100 101
                 });
101 102
             })
102 103
             ->sortBy(function ($package) {
103
-                if ($this->sortField === 'name')
104
-                    return $package['name'];
104
+                if ($this->sortField === 'name') {
105
+                                    return $package['name'];
106
+                }
105 107
 
106 108
                 return $package['name'];
107 109
             }, SORT_REGULAR, ! $this->sortAsc)
Please login to merge, or discard this patch.
src/System/Views/Components/AbilitiesDatatable.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -88,11 +88,11 @@  discard block
 block discarded – undo
88 88
     private function getResults(PolicyManager $manager, Gate $gate): LengthAwarePaginator
89 89
     {
90 90
         $abilities = $manager->abilities()
91
-            ->map(function (Ability $ability) use ($gate) {
91
+            ->map(function(Ability $ability) use ($gate) {
92 92
                 return $ability->setMeta('is_registered', $gate->has($ability->key()));
93 93
             })
94
-            ->unless(empty($this->search), function (Collection $items) {
95
-                return $items->filter(function (Ability $ability) {
94
+            ->unless(empty($this->search), function(Collection $items) {
95
+                return $items->filter(function(Ability $ability) {
96 96
                     $needles   = explode(' ', Str::lower($this->search));
97 97
                     $haystacks = [
98 98
                         $ability->key(),
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                     return false;
109 109
                 });
110 110
             })
111
-            ->sortBy(function (Ability $ability) {
111
+            ->sortBy(function(Ability $ability) {
112 112
                 if ($this->sortField === 'name')
113 113
                     return $ability->meta('name', '');
114 114
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -101,16 +101,18 @@
 block discarded – undo
101 101
                     ];
102 102
 
103 103
                     foreach ($haystacks as $haystack) {
104
-                        if (Str::contains(Str::lower($haystack), $needles))
105
-                            return true;
104
+                        if (Str::contains(Str::lower($haystack), $needles)) {
105
+                                                    return true;
106
+                        }
106 107
                     }
107 108
 
108 109
                     return false;
109 110
                 });
110 111
             })
111 112
             ->sortBy(function (Ability $ability) {
112
-                if ($this->sortField === 'name')
113
-                    return $ability->meta('name', '');
113
+                if ($this->sortField === 'name') {
114
+                                    return $ability->meta('name', '');
115
+                }
114 116
 
115 117
                 // $this->sortField === key or else, do the same sorting
116 118
                 return $ability->key();
Please login to merge, or discard this patch.
src/System/Views/Components/RoutesDatatable.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -123,8 +123,8 @@  discard block
 block discarded – undo
123 123
      */
124 124
     private function applySearchFilter(): Closure
125 125
     {
126
-        return function (RouteCollection $routes): RouteCollection {
127
-            return $routes->filter(function (Route $route): bool {
126
+        return function(RouteCollection $routes): RouteCollection {
127
+            return $routes->filter(function(Route $route): bool {
128 128
                 $needles   = explode(' ', Str::lower($this->search));
129 129
                 $haystacks = [
130 130
                     $route->uri,
@@ -149,8 +149,8 @@  discard block
 block discarded – undo
149 149
      */
150 150
     private function applyMethodFilter(): Closure
151 151
     {
152
-        return function (RouteCollection $routes): RouteCollection {
153
-            return $routes->filter(function (Route $route): bool {
152
+        return function(RouteCollection $routes): RouteCollection {
153
+            return $routes->filter(function(Route $route): bool {
154 154
                 $methods = Arr::pluck($route->methods, 'name');
155 155
 
156 156
                 return in_array($this->routeMethod, $methods);
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -133,8 +133,9 @@
 block discarded – undo
133 133
                 ];
134 134
 
135 135
                 foreach ($haystacks as $haystack) {
136
-                    if (Str::contains(Str::lower($haystack), $needles))
137
-                        return true;
136
+                    if (Str::contains(Str::lower($haystack), $needles)) {
137
+                                            return true;
138
+                    }
138 139
                 }
139 140
 
140 141
                 return false;
Please login to merge, or discard this patch.