@@ -60,7 +60,7 @@ |
||
60 | 60 | | |
61 | 61 | */ |
62 | 62 | |
63 | - 'upload_headers' => [], |
|
63 | + 'upload_headers' => [ ], |
|
64 | 64 | |
65 | 65 | /* |
66 | 66 | |-------------------------------------------------------------------------- |
@@ -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 | ); |
@@ -102,14 +102,14 @@ discard block |
||
102 | 102 | ]; |
103 | 103 | |
104 | 104 | \Event::fakeFor( |
105 | - function () use ($request) { |
|
105 | + function() use ($request) { |
|
106 | 106 | // First we create the model on database, then we are allowed to proceed |
107 | 107 | // sending the file to storage, no more breaks stops us from finishing, |
108 | 108 | // unless upload failed. |
109 | 109 | $this->save(); |
110 | 110 | $this->link($request); |
111 | 111 | }, |
112 | - array_map(function ($event) { |
|
112 | + array_map(function($event) { |
|
113 | 113 | return "eloquent.{$event}: ".static::class; |
114 | 114 | }, $fakeEvents) |
115 | 115 | ); |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | try { |
161 | 161 | // Execute the callable with the temporary file. You also can receive the |
162 | 162 | // model instance as second argument. |
163 | - Container::getInstance()->call($callback, [$file, $this]); |
|
163 | + Container::getInstance()->call($callback, [ $file, $this ]); |
|
164 | 164 | } catch (\Exception $ex) { |
165 | 165 | // Delete the temporary file wheter it exists. |
166 | 166 | File::delete($file->path()); |
@@ -214,8 +214,8 @@ discard block |
||
214 | 214 | public function fillUrl(string $url) |
215 | 215 | { |
216 | 216 | // Fill the url with unguarded permissions. |
217 | - static::unguarded(function () use ($url) { |
|
218 | - $this->fill([$this->getUrlField() => ltrim($url, '/')]); |
|
217 | + static::unguarded(function() use ($url) { |
|
218 | + $this->fill([ $this->getUrlField() => ltrim($url, '/') ]); |
|
219 | 219 | }); |
220 | 220 | |
221 | 221 | return $this; |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | return (array) ( |
271 | 271 | isset($this->customUploadHeaders) |
272 | 272 | ? $this->customUploadHeaders |
273 | - : config('lincable.upload_headers', []) |
|
273 | + : config('lincable.upload_headers', [ ]) |
|
274 | 274 | ); |
275 | 275 | } |
276 | 276 | |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | $url = $this->{$this->getUrlField()}; |
305 | 305 | |
306 | 306 | $options = collect($this->getHtmlOptions()) |
307 | - ->map(function ($value, $key) { |
|
307 | + ->map(function($value, $key) { |
|
308 | 308 | if (is_int($key)) { |
309 | 309 | $key = $value; |
310 | 310 | $value = ''; |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | */ |
325 | 325 | protected function getHtmlOptions() |
326 | 326 | { |
327 | - return []; |
|
327 | + return [ ]; |
|
328 | 328 | } |
329 | 329 | |
330 | 330 | /** |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | */ |
33 | 33 | protected static function bootCloneLinks() |
34 | 34 | { |
35 | - static::created(function ($model) { |
|
35 | + static::created(function($model) { |
|
36 | 36 | static::copyCloneMedia($model); |
37 | 37 | }); |
38 | 38 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | { |
48 | 48 | if ($model->isClone()) { |
49 | 49 | \Event::fakeFor( |
50 | - function () use ($model) { |
|
50 | + function() use ($model) { |
|
51 | 51 | static::getMediaManager()->copy( |
52 | 52 | $model->getSourceModel(), |
53 | 53 | $model, |