@@ -8,7 +8,7 @@ |
||
| 8 | 8 | class NewsletterController extends Controller |
| 9 | 9 | { |
| 10 | 10 | /** |
| 11 | - * @param \App\Http\Requests\Front\NewsletterSubscriptionRequest $request |
|
| 11 | + * @param NewsletterSubscriptionRequest $request |
|
| 12 | 12 | * |
| 13 | 13 | * @return \Illuminate\Http\JsonResponse |
| 14 | 14 | */ |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | |
| 28 | 28 | $result = Newsletter::subscribe($email); |
| 29 | 29 | |
| 30 | - if (! $result) { |
|
| 30 | + if (!$result) { |
|
| 31 | 31 | return $this->respondWithBadRequest(['message' => fragment('newsletter.subscription.result.error'), 'type' => 'error']); |
| 32 | 32 | } |
| 33 | 33 | |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | * Get the response for a successful password reset. |
| 61 | 61 | * |
| 62 | 62 | * @param string $response |
| 63 | - * @return \Illuminate\Http\Response |
|
| 63 | + * @return \Illuminate\Http\RedirectResponse |
|
| 64 | 64 | */ |
| 65 | 65 | protected function sendResetResponse($response) |
| 66 | 66 | { |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | public function showResetForm(Request $request, $token = null) |
| 46 | 46 | { |
| 47 | 47 | |
| 48 | - if (! $user = User::findByToken($token)) { |
|
| 48 | + if (!$user = User::findByToken($token)) { |
|
| 49 | 49 | flash()->error(trans('passwordReset.invalidToken')); |
| 50 | 50 | |
| 51 | 51 | return redirect()->to(login_url()); |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | public static function findByNameOrCreate(string $name, TagType $type): Tag |
| 33 | 33 | { |
| 34 | 34 | $existing = self::nonDraft()->get() |
| 35 | - ->first(function (Tag $tag, int $id) use ($name, $type) { |
|
| 35 | + ->first(function(Tag $tag, int $id) use ($name, $type) { |
|
| 36 | 36 | return $tag->translate('name', content_locale()) === $name && $tag->type === (string) $type; |
| 37 | 37 | }); |
| 38 | 38 | |
@@ -20,9 +20,9 @@ |
||
| 20 | 20 | |
| 21 | 21 | public function renderMetaTags(): string |
| 22 | 22 | { |
| 23 | - return $this->seo()->filter(function ($value, $key) { |
|
| 23 | + return $this->seo()->filter(function($value, $key) { |
|
| 24 | 24 | return starts_with($key, 'meta_'); |
| 25 | - })->map(function ($value, $key) : string { |
|
| 25 | + })->map(function($value, $key) : string { |
|
| 26 | 26 | $key = substr($key, 5); |
| 27 | 27 | $attribute = starts_with($key, 'og:') ? 'property' : 'name'; |
| 28 | 28 | return "<meta {$attribute}=\"{$key}\" content=\"{$value}\">"; |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | public function showResetForm(Request $request, $token = null) |
| 46 | 46 | { |
| 47 | 47 | |
| 48 | - if (! $user = User::findByToken($token)) { |
|
| 48 | + if (!$user = User::findByToken($token)) { |
|
| 49 | 49 | flash()->error(trans('passwordReset.invalidToken')); |
| 50 | 50 | |
| 51 | 51 | return redirect()->to(login_url()); |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | * Get the response for a successful password reset. |
| 61 | 61 | * |
| 62 | 62 | * @param string $response |
| 63 | - * @return \Illuminate\Http\Response |
|
| 63 | + * @return \Illuminate\Http\RedirectResponse |
|
| 64 | 64 | */ |
| 65 | 65 | protected function sendResetResponse($response) |
| 66 | 66 | { |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | /* |
| 20 | 20 | * Authenticate the user's personal channel... |
| 21 | 21 | */ |
| 22 | - Broadcast::channel('App.User.*', function ($user, $userId) { |
|
| 22 | + Broadcast::channel('App.User.*', function($user, $userId) { |
|
| 23 | 23 | return (int) $user->id === (int) $userId; |
| 24 | 24 | }); |
| 25 | 25 | } |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | * Get the response for a successful password reset. |
| 61 | 61 | * |
| 62 | 62 | * @param string $response |
| 63 | - * @return \Illuminate\Http\Response |
|
| 63 | + * @return \Illuminate\Http\RedirectResponse |
|
| 64 | 64 | */ |
| 65 | 65 | protected function sendResetResponse($response) |
| 66 | 66 | { |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | * Get the response for a successful password reset. |
| 61 | 61 | * |
| 62 | 62 | * @param string $response |
| 63 | - * @return \Illuminate\Http\Response |
|
| 63 | + * @return \Illuminate\Http\RedirectResponse |
|
| 64 | 64 | */ |
| 65 | 65 | protected function sendResetResponse($response) |
| 66 | 66 | { |
@@ -245,11 +245,11 @@ discard block |
||
| 245 | 245 | |
| 246 | 246 | public function seo(): string |
| 247 | 247 | { |
| 248 | - return locales()->map(function ($locale) { |
|
| 248 | + return locales()->map(function($locale) { |
|
| 249 | 249 | |
| 250 | 250 | return collect($this->model->defaultSeoValues()) |
| 251 | 251 | ->keys() |
| 252 | - ->map(function ($attribute) use ($locale) { |
|
| 252 | + ->map(function($attribute) use ($locale) { |
|
| 253 | 253 | |
| 254 | 254 | $fieldName = translate_field_name("seo.{$attribute}", $locale); |
| 255 | 255 | |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | ), |
| 262 | 262 | ]); |
| 263 | 263 | }) |
| 264 | - ->pipe(function (Collection $fields) use ($locale) { |
|
| 264 | + ->pipe(function(Collection $fields) use ($locale) { |
|
| 265 | 265 | return $this->languageFieldSet($locale, $fields->toArray()); |
| 266 | 266 | }); |
| 267 | 267 | })->implode(''); |