@@ -21,12 +21,12 @@ discard block |
||
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 |
||
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); |
@@ -70,7 +70,7 @@ |
||
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 | } |
@@ -162,7 +162,7 @@ |
||
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 | }); |
@@ -86,7 +86,7 @@ |
||
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(); |
@@ -66,7 +66,7 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -155,7 +155,7 @@ |
||
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(); |
@@ -78,7 +78,7 @@ |
||
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 | } |
@@ -183,7 +183,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | ); |
@@ -55,7 +55,7 @@ |
||
55 | 55 | */ |
56 | 56 | public function condition() |
57 | 57 | { |
58 | - return $this->queries->map(function ($query) { |
|
58 | + return $this->queries->map(function($query) { |
|
59 | 59 | return [$query['method'] => $query['arguments']]; |
60 | 60 | })->toArray(); |
61 | 61 | } |