Passed
Push — feature/optimize ( d14460...219eef )
by Fu
03:23
created
Http/Controllers/CoreController.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
         $name = Module::find('core')->name;
20 20
         $requirements = collect(Module::findRequirements('core'));
21
-        $requirements = $requirements->map(function ($item) {
21
+        $requirements = $requirements->map(function($item) {
22 22
             return $item->name;
23 23
         });
24 24
         $routes = get_routes('core');
Please login to merge, or discard this patch.
Routes/schedule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,6 +8,6 @@
 block discarded – undo
8 8
 
9 9
 use Illuminate\Console\Scheduling\Schedule;
10 10
 
11
-return function (Schedule $schedule) {
11
+return function(Schedule $schedule) {
12 12
     $schedule->command('telescope:prune')->daily();
13 13
 };
Please login to merge, or discard this patch.
helpers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -579,12 +579,12 @@
 block discarded – undo
579 579
     function get_routes($module = null): Collection
580 580
     {
581 581
         /** @var \Illuminate\Support\Collection $routes */
582
-        $routes = collect(Route::getRoutes()->getRoutesByName())->groupBy(function ($item, $key) {
582
+        $routes = collect(Route::getRoutes()->getRoutesByName())->groupBy(function($item, $key) {
583 583
             $keys = explode('.', $key);
584 584
 
585 585
             return $keys[0];
586
-        }, true)->map(function (Collection $item) {
587
-            return $item->mapWithKeys(function ($item, $key) {
586
+        }, true)->map(function(Collection $item) {
587
+            return $item->mapWithKeys(function($item, $key) {
588 588
                 $keys = explode('.', $key);
589 589
                 $route = collect($item->action)
590 590
                     ->put('method', $item->methods[0])
Please login to merge, or discard this patch.
Enums/StatusCodeEnum.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
 {
8 8
     const HTTP_CONTINUE = 100;
9 9
     const HTTP_SWITCHING_PROTOCOLS = 101;
10
-    const HTTP_PROCESSING = 102;            // RFC2518
11
-    const HTTP_EARLY_HINTS = 103;           // RFC8297
10
+    const HTTP_PROCESSING = 102; // RFC2518
11
+    const HTTP_EARLY_HINTS = 103; // RFC8297
12 12
     const HTTP_OK = 200;
13 13
     const HTTP_CREATED = 201;
14 14
     const HTTP_ACCEPTED = 202;
@@ -16,9 +16,9 @@  discard block
 block discarded – undo
16 16
     const HTTP_NO_CONTENT = 204;
17 17
     const HTTP_RESET_CONTENT = 205;
18 18
     const HTTP_PARTIAL_CONTENT = 206;
19
-    const HTTP_MULTI_STATUS = 207;          // RFC4918
20
-    const HTTP_ALREADY_REPORTED = 208;      // RFC5842
21
-    const HTTP_IM_USED = 226;               // RFC3229
19
+    const HTTP_MULTI_STATUS = 207; // RFC4918
20
+    const HTTP_ALREADY_REPORTED = 208; // RFC5842
21
+    const HTTP_IM_USED = 226; // RFC3229
22 22
     const HTTP_MULTIPLE_CHOICES = 300;
23 23
     const HTTP_MOVED_PERMANENTLY = 301;
24 24
     const HTTP_FOUND = 302;
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     const HTTP_USE_PROXY = 305;
28 28
     const HTTP_RESERVED = 306;
29 29
     const HTTP_TEMPORARY_REDIRECT = 307;
30
-    const HTTP_PERMANENTLY_REDIRECT = 308;  // RFC7238
30
+    const HTTP_PERMANENTLY_REDIRECT = 308; // RFC7238
31 31
     const HTTP_BAD_REQUEST = 400;
32 32
     const HTTP_UNAUTHORIZED = 401;
33 33
     const HTTP_PAYMENT_REQUIRED = 402;
@@ -46,21 +46,21 @@  discard block
 block discarded – undo
46 46
     const HTTP_UNSUPPORTED_MEDIA_TYPE = 415;
47 47
     const HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416;
48 48
     const HTTP_EXPECTATION_FAILED = 417;
49
-    const HTTP_I_AM_A_TEAPOT = 418;                                               // RFC2324
50
-    const HTTP_MISDIRECTED_REQUEST = 421;                                         // RFC7540
51
-    const HTTP_UNPROCESSABLE_ENTITY = 422;                                        // RFC4918
52
-    const HTTP_LOCKED = 423;                                                      // RFC4918
53
-    const HTTP_FAILED_DEPENDENCY = 424;                                           // RFC4918
49
+    const HTTP_I_AM_A_TEAPOT = 418; // RFC2324
50
+    const HTTP_MISDIRECTED_REQUEST = 421; // RFC7540
51
+    const HTTP_UNPROCESSABLE_ENTITY = 422; // RFC4918
52
+    const HTTP_LOCKED = 423; // RFC4918
53
+    const HTTP_FAILED_DEPENDENCY = 424; // RFC4918
54 54
 
55 55
     /**
56 56
      * @deprecated
57 57
      */
58
-    const HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425;   // RFC2817
59
-    const HTTP_TOO_EARLY = 425;                                                   // RFC-ietf-httpbis-replay-04
60
-    const HTTP_UPGRADE_REQUIRED = 426;                                            // RFC2817
61
-    const HTTP_PRECONDITION_REQUIRED = 428;                                       // RFC6585
62
-    const HTTP_TOO_MANY_REQUESTS = 429;                                           // RFC6585
63
-    const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431;                             // RFC6585
58
+    const HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425; // RFC2817
59
+    const HTTP_TOO_EARLY = 425; // RFC-ietf-httpbis-replay-04
60
+    const HTTP_UPGRADE_REQUIRED = 426; // RFC2817
61
+    const HTTP_PRECONDITION_REQUIRED = 428; // RFC6585
62
+    const HTTP_TOO_MANY_REQUESTS = 429; // RFC6585
63
+    const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; // RFC6585
64 64
     const HTTP_UNAVAILABLE_FOR_LEGAL_REASONS = 451;
65 65
     const HTTP_INTERNAL_SERVER_ERROR = 500;
66 66
     const HTTP_NOT_IMPLEMENTED = 501;
@@ -68,11 +68,11 @@  discard block
 block discarded – undo
68 68
     const HTTP_SERVICE_UNAVAILABLE = 503;
69 69
     const HTTP_GATEWAY_TIMEOUT = 504;
70 70
     const HTTP_VERSION_NOT_SUPPORTED = 505;
71
-    const HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL = 506;                        // RFC2295
72
-    const HTTP_INSUFFICIENT_STORAGE = 507;                                        // RFC4918
73
-    const HTTP_LOOP_DETECTED = 508;                                               // RFC5842
74
-    const HTTP_NOT_EXTENDED = 510;                                                // RFC2774
75
-    const HTTP_NETWORK_AUTHENTICATION_REQUIRED = 511;                             // RFC6585
71
+    const HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL = 506; // RFC2295
72
+    const HTTP_INSUFFICIENT_STORAGE = 507; // RFC4918
73
+    const HTTP_LOOP_DETECTED = 508; // RFC5842
74
+    const HTTP_NOT_EXTENDED = 510; // RFC2774
75
+    const HTTP_NETWORK_AUTHENTICATION_REQUIRED = 511; // RFC6585
76 76
 
77 77
     protected const __ = [
78 78
         self::HTTP_CONTINUE => 'continue',
Please login to merge, or discard this patch.
Providers/RouteServiceProvider.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
     protected function mapWebRoutes()
61 61
     {
62 62
         Route::middleware('web')
63
-             ->namespace($this->namespace)
64
-             ->group(__DIR__.'/../Routes/web.php');
63
+                ->namespace($this->namespace)
64
+                ->group(__DIR__.'/../Routes/web.php');
65 65
     }
66 66
 
67 67
     /**
@@ -74,9 +74,9 @@  discard block
 block discarded – undo
74 74
     protected function mapApiRoutes()
75 75
     {
76 76
         Route::prefix('api')
77
-             ->middleware('api')
78
-             ->namespace($this->namespace)
79
-             ->group(__DIR__.'/../Routes/api.php');
77
+                ->middleware('api')
78
+                ->namespace($this->namespace)
79
+                ->group(__DIR__.'/../Routes/api.php');
80 80
     }
81 81
 
82 82
     /**
Please login to merge, or discard this patch.
Providers/TelescopeServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
         $this->hideSensitiveRequestDetails();
22 22
 
23
-        Telescope::filter(function (IncomingEntry $entry) {
23
+        Telescope::filter(function(IncomingEntry $entry) {
24 24
             if ($this->app->isLocal()) {
25 25
                 return true;
26 26
             }
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     protected function gate()
63 63
     {
64
-        Gate::define('viewTelescope', function ($user) {
64
+        Gate::define('viewTelescope', function($user) {
65 65
             return in_array($user->email, [
66 66
                 //
67 67
             ]);
Please login to merge, or discard this patch.
Providers/RepositoryFilterContainerProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      */
22 22
     public function register()
23 23
     {
24
-        $this->app->singleton(Filter::class, function () {
24
+        $this->app->singleton(Filter::class, function() {
25 25
             return new Filter();
26 26
         });
27 27
     }
Please login to merge, or discard this patch.
Providers/CoreServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             $sourcePath => $viewPath,
88 88
         ], 'views');
89 89
 
90
-        $this->loadViewsFrom(array_merge(array_map(function ($path) {
90
+        $this->loadViewsFrom(array_merge(array_map(function($path) {
91 91
             return $path.'/modules/core';
92 92
         }, Config::get('view.paths')), [$sourcePath]), 'core');
93 93
     }
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 
138 138
     public function registerObservers()
139 139
     {
140
-        Event::/** @scrutinizer ignore-call */ listen(RepositoryEventBase::class, function (
140
+        Event::/** @scrutinizer ignore-call */ listen(RepositoryEventBase::class, function(
141 141
             RepositoryEventBase $repositoryEntityCreated
142 142
         ) {
143 143
             $model = $repositoryEntityCreated->getModel();
Please login to merge, or discard this patch.
Http/Middleware/RefreshToken.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      */
23 23
     public function handle($request, Closure $next, $guard)
24 24
     {
25
-        app()->singleton('tymon.jwt.auth', function () use ($guard) {
25
+        app()->singleton('tymon.jwt.auth', function() use ($guard) {
26 26
             /** @var GuardContract $auth */
27 27
             $auth = auth($guard);
28 28
             return new JWTAuth(app('tymon.jwt.manager'), new Illuminate($auth), app('tymon.jwt.parser'));
Please login to merge, or discard this patch.