@@ -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); |
@@ -79,7 +79,7 @@ |
||
| 79 | 79 | return $this |
| 80 | 80 | ->model |
| 81 | 81 | ->where('topic_id', $topicId) |
| 82 | - ->where('posts.created_at', '<', fn ($builder) => $builder->select('created_at')->from('posts')->where('id', $postId)) |
|
| 82 | + ->where('posts.created_at', '<', fn($builder) => $builder->select('created_at')->from('posts')->where('id', $postId)) |
|
| 83 | 83 | ->count(); |
| 84 | 84 | }); |
| 85 | 85 | |