@@ -29,8 +29,8 @@ discard block |
||
29 | 29 | */ |
30 | 30 | protected static function bootLincable() |
31 | 31 | { |
32 | - static::deleted(function ($model) { |
|
33 | - if (! $model->shouldKeepMediaWhenDeleted()) { |
|
32 | + static::deleted(function($model) { |
|
33 | + if (!$model->shouldKeepMediaWhenDeleted()) { |
|
34 | 34 | static::getMediaManager()->delete($model); |
35 | 35 | } |
36 | 36 | }); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | { |
70 | 70 | return tap( |
71 | 71 | $query->newModelInstance($fileRequest->all()), |
72 | - function ($instance) use ($fileRequest) { |
|
72 | + function($instance) use ($fileRequest) { |
|
73 | 73 | $instance->perfomCreateWithFileRequest($fileRequest); |
74 | 74 | } |
75 | 75 | ); |
@@ -94,14 +94,14 @@ discard block |
||
94 | 94 | $silentEvents = $this->getSilentUploadEvents(); |
95 | 95 | |
96 | 96 | \Event::fakeFor( |
97 | - function () use ($request) { |
|
97 | + function() use ($request) { |
|
98 | 98 | // First we create the model on database, then we are allowed to proceed |
99 | 99 | // sending the file to storage, no more breaks stops us from finishing, |
100 | 100 | // unless upload failed. |
101 | 101 | $this->save(); |
102 | 102 | $this->link($request); |
103 | 103 | }, |
104 | - array_map(function ($event) { |
|
104 | + array_map(function($event) { |
|
105 | 105 | return "eloquent.{$event}: ".static::class; |
106 | 106 | }, $silentEvents) |
107 | 107 | ); |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | try { |
153 | 153 | // Execute the callable with the temporary file. You also can receive the |
154 | 154 | // model instance as second argument. |
155 | - Container::getInstance()->call($callback, [$file, $this]); |
|
155 | + Container::getInstance()->call($callback, [ $file, $this ]); |
|
156 | 156 | } catch (\Exception $ex) { |
157 | 157 | // Delete the temporary file wheter it exists. |
158 | 158 | File::delete($file->path()); |
@@ -206,8 +206,8 @@ discard block |
||
206 | 206 | public function fillUrl(string $url) |
207 | 207 | { |
208 | 208 | // Fill the url with unguarded permissions. |
209 | - static::unguarded(function () use ($url) { |
|
210 | - $this->fill([$this->getUrlField() => ltrim($url, '/')]); |
|
209 | + static::unguarded(function() use ($url) { |
|
210 | + $this->fill([ $this->getUrlField() => ltrim($url, '/') ]); |
|
211 | 211 | }); |
212 | 212 | |
213 | 213 | return $this; |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | return (array) ( |
263 | 263 | isset($this->customUploadHeaders) |
264 | 264 | ? $this->customUploadHeaders |
265 | - : config('lincable.upload_headers', []) |
|
265 | + : config('lincable.upload_headers', [ ]) |
|
266 | 266 | ); |
267 | 267 | } |
268 | 268 | |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | { |
278 | 278 | return (array) ( |
279 | 279 | $this->silentUploadEvents ?? |
280 | - config('lincable.models.silent_upload_events', []) |
|
280 | + config('lincable.models.silent_upload_events', [ ]) |
|
281 | 281 | ); |
282 | 282 | } |
283 | 283 | |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | $url = $this->{$this->getUrlField()}; |
312 | 312 | |
313 | 313 | $options = collect($this->getHtmlOptions()) |
314 | - ->map(function ($value, $key) { |
|
314 | + ->map(function($value, $key) { |
|
315 | 315 | if (is_int($key)) { |
316 | 316 | $key = $value; |
317 | 317 | $value = ''; |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | */ |
332 | 332 | protected function getHtmlOptions() |
333 | 333 | { |
334 | - return []; |
|
334 | + return [ ]; |
|
335 | 335 | } |
336 | 336 | |
337 | 337 | /** |