Passed
Push β€” master ( a19138...d27343 )
by Sheldon
04:02
created
app/Http/Controllers/Backend/Tools/Routes/RouteController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,10 +41,10 @@  discard block
 block discarded – undo
41 41
             'middleware' => 'Middleware',
42 42
         ];
43 43
 
44
-        $routes = collect($routes)->map(function ($item) use ($colors) {
44
+        $routes = collect($routes)->map(function($item) use ($colors) {
45 45
             $data = [];
46 46
 
47
-            $data['method'] = collect($item->method)->map(function ($method) use ($colors) {
47
+            $data['method'] = collect($item->method)->map(function($method) use ($colors) {
48 48
                 return "<span class=\"label bg-{$colors[$method]}\">$method</span>";
49 49
             })->implode('&nbsp;');
50 50
             $data['uri'] = preg_replace('/\{.+?\}/', '<code>$0</span>', $item->uri);
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
             public function get()
93 93
             {
94
-                $this->routes = collect($this->routes)->filter(function ($route) {
94
+                $this->routes = collect($this->routes)->filter(function($route) {
95 95
                     foreach ($this->where as $column => $condition) {
96 96
                         if (!Str::contains($route[$column], $condition)) {
97 97
                             return false;
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                 })->all();
103 103
                 $instance = $this->newModelInstance();
104 104
 
105
-                return $instance->newCollection(array_map(function ($item) use ($instance) {
105
+                return $instance->newCollection(array_map(function($item) use ($instance) {
106 106
                     return $instance->newFromBuilder($item);
107 107
                 }, $this->routes));
108 108
             }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     public function getRoutes()
113 113
     {
114 114
         $routes = app('router')->getRoutes();
115
-        $routes = collect($routes)->map(function ($route) {
115
+        $routes = collect($routes)->map(function($route) {
116 116
             return $this->getRouteInformation($route);
117 117
         })->all();
118 118
         if ($sort = request('orderBy')) {
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
      */
173 173
     protected function getRouteMiddleware($route)
174 174
     {
175
-        return collect($route->gatherMiddleware())->map(function ($middleware) {
175
+        return collect($route->gatherMiddleware())->map(function($middleware) {
176 176
             return $middleware instanceof \Closure ? 'Closure' : $middleware;
177 177
         });
178 178
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/Tools/Terminal/TerminalController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
                 'selected' => $name == config('database.default'),
87 87
             ];
88 88
         }
89
-        $connections = array_filter(config('database.redis'), function ($config) {
89
+        $connections = array_filter(config('database.redis'), function($config) {
90 90
             return is_array($config);
91 91
         });
92 92
         foreach ($connections as $name => $_) {
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/HomeController.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -13,20 +13,20 @@
 block discarded – undo
13 13
     {
14 14
         // environment
15 15
         $envs = [
16
-            ['name' => 'PHP version',       'value' => 'PHP/'.PHP_VERSION],
17
-            ['name' => 'Laravel version',   'value' => app()->version()],
18
-            ['name' => 'CGI',               'value' => php_sapi_name()],
19
-            ['name' => 'Uname',             'value' => php_uname()],
20
-            ['name' => 'Server',            'value' => array_get($_SERVER, 'SERVER_SOFTWARE')],
16
+            ['name' => 'PHP version', 'value' => 'PHP/'.PHP_VERSION],
17
+            ['name' => 'Laravel version', 'value' => app()->version()],
18
+            ['name' => 'CGI', 'value' => php_sapi_name()],
19
+            ['name' => 'Uname', 'value' => php_uname()],
20
+            ['name' => 'Server', 'value' => array_get($_SERVER, 'SERVER_SOFTWARE')],
21 21
 
22
-            ['name' => 'Cache driver',      'value' => config('cache.default')],
23
-            ['name' => 'Session driver',    'value' => config('session.driver')],
24
-            ['name' => 'Queue driver',      'value' => config('queue.default')],
22
+            ['name' => 'Cache driver', 'value' => config('cache.default')],
23
+            ['name' => 'Session driver', 'value' => config('session.driver')],
24
+            ['name' => 'Queue driver', 'value' => config('queue.default')],
25 25
 
26
-            ['name' => 'Timezone',          'value' => config('app.timezone')],
27
-            ['name' => 'Locale',            'value' => config('app.locale')],
28
-            ['name' => 'Env',               'value' => config('app.env')],
29
-            ['name' => 'URL',               'value' => config('app.url')],
26
+            ['name' => 'Timezone', 'value' => config('app.timezone')],
27
+            ['name' => 'Locale', 'value' => config('app.locale')],
28
+            ['name' => 'Env', 'value' => config('app.env')],
29
+            ['name' => 'URL', 'value' => config('app.url')],
30 30
         ];
31 31
 
32 32
         // tools
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/AdminMenusController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,10 +58,10 @@
 block discarded – undo
58 58
      */
59 59
     protected function treeView()
60 60
     {
61
-        return new Tree($this->repository->makeModel(), function (Tree $tree) {
61
+        return new Tree($this->repository->makeModel(), function(Tree $tree) {
62 62
             $tree->disableCreate();
63 63
 
64
-            $tree->branch(function ($branch) {
64
+            $tree->branch(function($branch) {
65 65
                 $payload = "<i class='fa {$branch['icon']}'></i>&nbsp;<strong>{$branch['title']}</strong>";
66 66
 
67 67
                 if (!isset($branch['children'])) {
Please login to merge, or discard this patch.
app/Http/Controllers/Api/Foundation/Validation/ValidatesRequests.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
      */
92 92
     public function validateWithBag($errorBag, Request $request, array $rules, array $messages = [], array $customAttributes = [])
93 93
     {
94
-        $this->withErrorBag($errorBag, function () use ($request, $rules, $messages, $customAttributes) {
94
+        $this->withErrorBag($errorBag, function() use ($request, $rules, $messages, $customAttributes) {
95 95
             $this->validate($request, $rules, $messages, $customAttributes);
96 96
         });
97 97
     }
Please login to merge, or discard this patch.
app/Http/Middleware/Pjax.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public static function respond(Response $response)
49 49
     {
50
-        $next = function () use ($response) {
50
+        $next = function() use ($response) {
51 51
             return $response;
52 52
         };
53 53
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      */
140 140
     protected function decodeUtf8HtmlEntities($html)
141 141
     {
142
-        return preg_replace_callback('/(&#[0-9]+;)/', function ($html) {
142
+        return preg_replace_callback('/(&#[0-9]+;)/', function($html) {
143 143
             return mb_convert_encoding($html[1], 'UTF-8', 'HTML-ENTITIES');
144 144
         }, $html);
145 145
     }
Please login to merge, or discard this patch.
app/Http/Middleware/Permission.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
             return $next($request);
34 34
         }
35 35
 
36
-        if (!Auth::guard(config('yeelight.backend.route.prefix'))->user()->allPermissions()->first(function ($permission) use ($request) {
36
+        if (!Auth::guard(config('yeelight.backend.route.prefix'))->user()->allPermissions()->first(function($permission) use ($request) {
37 37
             return $permission->shouldPassThrough($request);
38 38
         })) {
39 39
             Checker::error();
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function checkRoutePermission(Request $request)
54 54
     {
55
-        if (!$middleware = collect($request->route()->middleware())->first(function ($middleware) {
55
+        if (!$middleware = collect($request->route()->middleware())->first(function($middleware) {
56 56
             return Str::startsWith($middleware, $this->middlewarePrefix);
57 57
         })) {
58 58
             return false;
Please login to merge, or discard this patch.
app/Validators/AdminUserValidator.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,5 +10,5 @@
 block discarded – undo
10 10
     protected $rules = [
11 11
         ValidatorInterface::RULE_CREATE => [],
12 12
         ValidatorInterface::RULE_UPDATE => [],
13
-   ];
13
+    ];
14 14
 }
Please login to merge, or discard this patch.
app/Validators/ProductModelValidator.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,5 +18,5 @@
 block discarded – undo
18 18
         'model_name'	=> '	required|max:150',
19 19
         'code'	      => '	required|max:50',
20 20
     ],
21
-   ];
21
+    ];
22 22
 }
Please login to merge, or discard this patch.