@@ -15,10 +15,10 @@ |
||
15 | 15 | } |
16 | 16 | |
17 | 17 | $visitors = Analytics::fetchVisitorsAndPageViews(Period::days(365)) |
18 | - ->groupBy(function (array $visitorStatistics) { |
|
18 | + ->groupBy(function(array $visitorStatistics) { |
|
19 | 19 | return $visitorStatistics['date']->format('Y-m'); |
20 | 20 | }) |
21 | - ->map(function ($visitorStatistics, $yearMonth) { |
|
21 | + ->map(function($visitorStatistics, $yearMonth) { |
|
22 | 22 | list($year, $month) = explode('-', $yearMonth); |
23 | 23 | |
24 | 24 | return [ |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $model = $this->getModelFromRequest($request); |
19 | 19 | |
20 | 20 | $media = collect($request->file('file')) |
21 | - ->map(function (UploadedFile $file) use ($model, $request) { |
|
21 | + ->map(function(UploadedFile $file) use ($model, $request) { |
|
22 | 22 | return $model |
23 | 23 | ->addMedia($file) |
24 | 24 | ->withCustomProperties(['temp' => $request->has('redactor') ? false : true]) |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | |
39 | 39 | $collectionName = $request->get('collectionName'); |
40 | 40 | |
41 | - $media = $model->getMedia($collectionName)->reduce(function (Collection $collection, Media $media) { |
|
41 | + $media = $model->getMedia($collectionName)->reduce(function(Collection $collection, Media $media) { |
|
42 | 42 | return $collection->push([ |
43 | 43 | 'thumb' => $media->getUrl('admin'), |
44 | 44 | 'image' => $media->getUrl('redactor'), |
@@ -17,8 +17,7 @@ |
||
17 | 17 | 'customProperties' => json_encode($media->custom_properties, JSON_FORCE_OBJECT), |
18 | 18 | 'orderColumn' => $media->order_column, |
19 | 19 | 'thumbUrl' => strtolower($media->extension) === 'svg' ? |
20 | - $media->getUrl() : |
|
21 | - $media->getUrl('admin'), |
|
20 | + $media->getUrl() : $media->getUrl('admin'), |
|
22 | 21 | 'originalUrl' => $media->getUrl(), |
23 | 22 | ]; |
24 | 23 | } |
@@ -15,29 +15,29 @@ |
||
15 | 15 | */ |
16 | 16 | public function register() |
17 | 17 | { |
18 | - Collection::macro('pipe', function ($callback) { |
|
18 | + Collection::macro('pipe', function($callback) { |
|
19 | 19 | return $callback($this); |
20 | 20 | }); |
21 | 21 | |
22 | - Collection::macro('dd', function () { |
|
22 | + Collection::macro('dd', function() { |
|
23 | 23 | dd($this); |
24 | 24 | }); |
25 | 25 | |
26 | - Collection::macro('ifEmpty', function ($callback) { |
|
26 | + Collection::macro('ifEmpty', function($callback) { |
|
27 | 27 | if ($this->empty()) { |
28 | 28 | $callback(); |
29 | 29 | } |
30 | 30 | return $this; |
31 | 31 | }); |
32 | 32 | |
33 | - Collection::macro('ifAny', function ($callback) { |
|
34 | - if (! $this->empty()) { |
|
33 | + Collection::macro('ifAny', function($callback) { |
|
34 | + if (!$this->empty()) { |
|
35 | 35 | $callback($this); |
36 | 36 | } |
37 | 37 | return $this; |
38 | 38 | }); |
39 | 39 | |
40 | - Collection::macro('range', function ($low, $high, $step = 1): Collection { |
|
40 | + Collection::macro('range', function($low, $high, $step = 1): Collection { |
|
41 | 41 | return new Collection(range($low, $high, $step)); |
42 | 42 | }); |
43 | 43 | } |