@@ -88,7 +88,7 @@ |
||
88 | 88 | |
89 | 89 | return [ |
90 | 90 | 'count' => $collection->count(), |
91 | - 'users' => $collection->when($collection->count() > 10, fn ($collection) => $collection->splice(0, 10)->concat(['...'])) |
|
91 | + 'users' => $collection->when($collection->count() > 10, fn($collection) => $collection->splice(0, 10)->concat(['...'])) |
|
92 | 92 | ]; |
93 | 93 | } |
94 | 94 | } |
@@ -62,7 +62,7 @@ |
||
62 | 62 | return $next($request); |
63 | 63 | }); |
64 | 64 | |
65 | - TagResource::urlResolver(fn ($name) => route('forum.tag', [urlencode($name)])); |
|
65 | + TagResource::urlResolver(fn($name) => route('forum.tag', [urlencode($name)])); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
@@ -43,7 +43,7 @@ |
||
43 | 43 | */ |
44 | 44 | public function __construct(Auth $auth, TopicRepository $repository) |
45 | 45 | { |
46 | - TagResource::urlResolver(fn ($name) => route('forum.tag', [urlencode($name)])); |
|
46 | + TagResource::urlResolver(fn($name) => route('forum.tag', [urlencode($name)])); |
|
47 | 47 | |
48 | 48 | $this->repository = $repository; |
49 | 49 | $this->user = $auth->guard('api')->user(); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | parent::__construct($resource); |
25 | 25 | |
26 | 26 | if (empty(static::$urlResolver)) { |
27 | - static::$urlResolver = fn ($name) => route('job.tag', [urlencode($name)]); |
|
27 | + static::$urlResolver = fn($name) => route('job.tag', [urlencode($name)]); |
|
28 | 28 | } |
29 | 29 | } |
30 | 30 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | return $this->pivot->priority; |
55 | 55 | }), |
56 | 56 | |
57 | - 'category' => $this->whenLoaded('category', fn () => $this->category->name) |
|
57 | + 'category' => $this->whenLoaded('category', fn() => $this->category->name) |
|
58 | 58 | ]); |
59 | 59 | } |
60 | 60 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | $parent = $this->resource->only(['id', 'name', 'is_online', 'bio', 'location', 'allow_sig', 'allow_count', 'allow_smilies', 'posts', 'location', 'visited_at', 'created_at', 'group_name']); |
25 | 25 | |
26 | 26 | $result = array_merge( |
27 | - array_filter($parent, fn ($value) => $value !== null), |
|
27 | + array_filter($parent, fn($value) => $value !== null), |
|
28 | 28 | [ |
29 | 29 | 'photo' => (string) $this->photo->url() ?: null, |
30 | 30 | 'deleted_at' => $this->resource->deleted_at, |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | 'user' => UserResource::make($this->user), |
60 | 60 | |
61 | 61 | 'permissions' => [ |
62 | - 'update' => $this->when($request->user(), fn () => $request->user()->can('update', $this->resource), false) |
|
62 | + 'update' => $this->when($request->user(), fn() => $request->user()->can('update', $this->resource), false) |
|
63 | 63 | ], |
64 | 64 | |
65 | 65 | 'comments_count'=> $this->when($this->comments_count, $this->comments_count), |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | }), |
70 | 70 | |
71 | 71 | // @todo do zmiany na assets |
72 | - 'media' => $this->whenLoaded('assets', fn () => AssetsResource::collection($this->assets), []) |
|
72 | + 'media' => $this->whenLoaded('assets', fn() => AssetsResource::collection($this->assets), []) |
|
73 | 73 | ] |
74 | 74 | ); |
75 | 75 | } |
@@ -83,6 +83,6 @@ discard block |
||
83 | 83 | |
84 | 84 | private function isNotComment(): bool |
85 | 85 | { |
86 | - return ! $this->parent_id && $this->resource->relationLoaded('comments'); |
|
86 | + return !$this->parent_id && $this->resource->relationLoaded('comments'); |
|
87 | 87 | } |
88 | 88 | } |
@@ -90,7 +90,7 @@ |
||
90 | 90 | 'suggest' => $this->getSuggest(), |
91 | 91 | 'subscribers' => $this->subscribers()->pluck('user_id'), |
92 | 92 | |
93 | - 'firm' => $this->when($this->firm_id, fn () => new FirmResource($this->firm)) |
|
93 | + 'firm' => $this->when($this->firm_id, fn() => new FirmResource($this->firm)) |
|
94 | 94 | ]); |
95 | 95 | |
96 | 96 | return $body; |
@@ -111,7 +111,7 @@ |
||
111 | 111 | ]; |
112 | 112 | |
113 | 113 | if (!$asset->isImage()) { |
114 | - $headers['Content-Disposition'] = 'attachment; filename="'. $asset->name .'"'; |
|
114 | + $headers['Content-Disposition'] = 'attachment; filename="' . $asset->name . '"'; |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | return response()->make($filesystem->get($asset->path), 200, $headers); |
@@ -119,7 +119,7 @@ |
||
119 | 119 | |
120 | 120 | public function withValidator(Validator $validator) |
121 | 121 | { |
122 | - $shouldValidatePoll = fn () => count(array_filter($this->input('poll.items.*.text', []))) >= 1; |
|
122 | + $shouldValidatePoll = fn() => count(array_filter($this->input('poll.items.*.text', []))) >= 1; |
|
123 | 123 | |
124 | 124 | $validator->sometimes('poll.items', ['min:2'], $shouldValidatePoll); |
125 | 125 | $validator->sometimes('poll.items.*.text', ['required', 'string', 'max:200'], $shouldValidatePoll); |