Completed
Pull Request — master (#3175)
by jxlwqq
02:22
created
src/Controllers/Dashboard.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -20,20 +20,20 @@
 block discarded – undo
20 20
     public static function environment()
21 21
     {
22 22
         $envs = [
23
-            ['name' => 'PHP version',       'value' => 'PHP/'.PHP_VERSION],
24
-            ['name' => 'Laravel version',   'value' => app()->version()],
25
-            ['name' => 'CGI',               'value' => php_sapi_name()],
26
-            ['name' => 'Uname',             'value' => php_uname()],
27
-            ['name' => 'Server',            'value' => array_get($_SERVER, 'SERVER_SOFTWARE')],
23
+            ['name' => 'PHP version', 'value' => 'PHP/'.PHP_VERSION],
24
+            ['name' => 'Laravel version', 'value' => app()->version()],
25
+            ['name' => 'CGI', 'value' => php_sapi_name()],
26
+            ['name' => 'Uname', 'value' => php_uname()],
27
+            ['name' => 'Server', 'value' => array_get($_SERVER, 'SERVER_SOFTWARE')],
28 28
 
29
-            ['name' => 'Cache driver',      'value' => config('cache.default')],
30
-            ['name' => 'Session driver',    'value' => config('session.driver')],
31
-            ['name' => 'Queue driver',      'value' => config('queue.default')],
29
+            ['name' => 'Cache driver', 'value' => config('cache.default')],
30
+            ['name' => 'Session driver', 'value' => config('session.driver')],
31
+            ['name' => 'Queue driver', 'value' => config('queue.default')],
32 32
 
33
-            ['name' => 'Timezone',          'value' => config('app.timezone')],
34
-            ['name' => 'Locale',            'value' => config('app.locale')],
35
-            ['name' => 'Env',               'value' => config('app.env')],
36
-            ['name' => 'URL',               'value' => config('app.url')],
33
+            ['name' => 'Timezone', 'value' => config('app.timezone')],
34
+            ['name' => 'Locale', 'value' => config('app.locale')],
35
+            ['name' => 'Env', 'value' => config('app.env')],
36
+            ['name' => 'URL', 'value' => config('app.url')],
37 37
         ];
38 38
 
39 39
         return view('admin::dashboard.environment', compact('envs'));
Please login to merge, or discard this patch.
src/Grid/Exporters/CsvExporter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,12 +21,12 @@  discard block
 block discarded – undo
21 21
             'Content-Disposition' => "attachment; filename=\"$filename\"",
22 22
         ];
23 23
 
24
-        response()->stream(function () {
24
+        response()->stream(function() {
25 25
             $handle = fopen('php://output', 'w');
26 26
 
27 27
             $titles = [];
28 28
 
29
-            $this->chunk(function ($records) use ($handle, &$titles) {
29
+            $this->chunk(function($records) use ($handle, &$titles) {
30 30
                 if (empty($titles)) {
31 31
                     $titles = $this->getHeaderRowFromRecords($records);
32 32
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     public function getHeaderRowFromRecords(Collection $records): array
55 55
     {
56 56
         $titles = collect(array_dot($records->first()->toArray()))->keys()->map(
57
-            function ($key) {
57
+            function($key) {
58 58
                 $key = str_replace('.', ' ', $key);
59 59
 
60 60
                 return Str::ucfirst($key);
Please login to merge, or discard this patch.
src/Widgets/Navbar.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
             return '';
71 71
         }
72 72
 
73
-        return $this->elements[$part]->map(function ($element) {
73
+        return $this->elements[$part]->map(function($element) {
74 74
             if ($element instanceof Htmlable) {
75 75
                 return $element->toHtml();
76 76
             }
Please login to merge, or discard this patch.
src/Widgets/Form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@
 block discarded – undo
162 162
      */
163 163
     public function setWidth($fieldWidth = 8, $labelWidth = 2)
164 164
     {
165
-        collect($this->fields)->each(function ($field) use ($fieldWidth, $labelWidth) {
165
+        collect($this->fields)->each(function($field) use ($fieldWidth, $labelWidth) {
166 166
             /* @var Field $field  */
167 167
             $field->setWidth($fieldWidth, $labelWidth);
168 168
         });
Please login to merge, or discard this patch.
src/Auth/Database/Role.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
     {
87 87
         parent::boot();
88 88
 
89
-        static::deleting(function ($model) {
89
+        static::deleting(function($model) {
90 90
             $model->administrators()->detach();
91 91
 
92 92
             $model->permissions()->detach();
Please login to merge, or discard this patch.
src/Auth/Database/Permission.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
         $method = $this->http_method;
68 68
 
69
-        $matches = array_map(function ($path) use ($method) {
69
+        $matches = array_map(function($path) use ($method) {
70 70
             $path = trim(config('admin.route.prefix'), '/').$path;
71 71
 
72 72
             if (Str::contains($path, ':')) {
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             return false;
101 101
         }
102 102
 
103
-        $method = collect($match['method'])->filter()->map(function ($method) {
103
+        $method = collect($match['method'])->filter()->map(function($method) {
104 104
             return strtoupper($method);
105 105
         });
106 106
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     {
141 141
         parent::boot();
142 142
 
143
-        static::deleting(function ($model) {
143
+        static::deleting(function($model) {
144 144
             $model->roles()->detach();
145 145
         });
146 146
     }
Please login to merge, or discard this patch.
src/Auth/Database/HasPermissions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@
 block discarded – undo
155 155
     {
156 156
         parent::boot();
157 157
 
158
-        static::deleting(function ($model) {
158
+        static::deleting(function($model) {
159 159
             $model->roles()->detach();
160 160
 
161 161
             $model->permissions()->detach();
Please login to merge, or discard this patch.
src/Auth/Database/Menu.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
     {
79 79
         static::treeBoot();
80 80
 
81
-        static::deleting(function ($model) {
81
+        static::deleting(function($model) {
82 82
             $model->roles()->detach();
83 83
         });
84 84
     }
Please login to merge, or discard this patch.
src/Show.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
         $this->overwriteExistingField($name);
185 185
 
186
-        return tap($field, function ($field) {
186
+        return tap($field, function($field) {
187 187
             $this->fields->push($field);
188 188
         });
189 189
     }
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 
206 206
         $this->overwriteExistingRelation($name);
207 207
 
208
-        return tap($relation, function ($relation) {
208
+        return tap($relation, function($relation) {
209 209
             $this->relations->push($relation);
210 210
         });
211 211
     }
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
         }
223 223
 
224 224
         $this->fields = $this->fields->filter(
225
-            function (Field $field) use ($name) {
225
+            function(Field $field) use ($name) {
226 226
                 return $field->getName() != $name;
227 227
             }
228 228
         );
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
         }
241 241
 
242 242
         $this->relations = $this->relations->filter(
243
-            function (Relation $relation) use ($name) {
243
+            function(Relation $relation) use ($name) {
244 244
                 return $relation->getName() != $name;
245 245
             }
246 246
         );
Please login to merge, or discard this patch.