@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | { |
11 | 11 | parent::__construct($resource); |
12 | 12 | |
13 | - TagResource::urlResolver(fn ($name) => route('microblog.tag', [urlencode($name)])); |
|
13 | + TagResource::urlResolver(fn($name) => route('microblog.tag', [urlencode($name)])); |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | public function toArray($request) |
@@ -22,12 +22,12 @@ discard block |
||
22 | 22 | |
23 | 23 | return array_merge_recursive($result, [ |
24 | 24 | 'assets' => $assets, |
25 | - 'tags' => $this->whenLoaded('tags', fn () => TagResource::collection($this->resource->tags)), |
|
25 | + 'tags' => $this->whenLoaded('tags', fn() => TagResource::collection($this->resource->tags)), |
|
26 | 26 | 'is_sponsored' => $this->resource->is_sponsored, |
27 | 27 | 'metadata' => encrypt([Microblog::class => $this->resource->id]), |
28 | 28 | |
29 | 29 | 'permissions' => [ |
30 | - 'moderate' => $this->when($request->user(), fn () => $request->user()->can('moderate', $this->resource), false) |
|
30 | + 'moderate' => $this->when($request->user(), fn() => $request->user()->can('moderate', $this->resource), false) |
|
31 | 31 | ] |
32 | 32 | ]); |
33 | 33 | } |
@@ -13,17 +13,17 @@ |
||
13 | 13 | { |
14 | 14 | public function handleTopicDelete(TopicWasDeleted $event) |
15 | 15 | { |
16 | - Flag::whereHas('topics', fn (Builder $query) => $query->withTrashed()->where('id', $event->topic['id']))->delete(); |
|
16 | + Flag::whereHas('topics', fn(Builder $query) => $query->withTrashed()->where('id', $event->topic['id']))->delete(); |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | public function handlePostDelete(PostWasDeleted $event) |
20 | 20 | { |
21 | - Flag::whereHas('posts', fn (Builder $query) => $query->withTrashed()->where('id', $event->post['id']))->delete(); |
|
21 | + Flag::whereHas('posts', fn(Builder $query) => $query->withTrashed()->where('id', $event->post['id']))->delete(); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | public function handleMicroblogDelete(MicroblogDeleted $event) |
25 | 25 | { |
26 | - Flag::whereHas('microblogs', fn (Builder $query) => $query->withTrashed()->where('id', $event->microblog['id']))->delete(); |
|
26 | + Flag::whereHas('microblogs', fn(Builder $query) => $query->withTrashed()->where('id', $event->microblog['id']))->delete(); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | public function subscribe($events) |
@@ -159,7 +159,7 @@ |
||
159 | 159 | private function mark($notifications) |
160 | 160 | { |
161 | 161 | $ids = $notifications |
162 | - ->reject(fn (Notification $notification) => $notification->read_at !== null) |
|
162 | + ->reject(fn(Notification $notification) => $notification->read_at !== null) |
|
163 | 163 | ->pluck('id') |
164 | 164 | ->all(); |
165 | 165 |