@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | $tags = Tag::getWithType($tagType); |
| 43 | 43 | |
| 44 | 44 | return $this->getAllOnline() |
| 45 | - ->groupBy(function (Model $model) use ($tagType) { |
|
| 45 | + ->groupBy(function(Model $model) use ($tagType) { |
|
| 46 | 46 | $firstTag = $model->tagsWithType($tagType)->first(); |
| 47 | 47 | |
| 48 | 48 | if (!$firstTag) { |
@@ -51,13 +51,13 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | return $firstTag->id; |
| 53 | 53 | }) |
| 54 | - ->map(function ($tagIdsWithModels, int $tagId) use ($tags) { |
|
| 54 | + ->map(function($tagIdsWithModels, int $tagId) use ($tags) { |
|
| 55 | 55 | return [ |
| 56 | 56 | 'tag' => $tags->get($tagId), |
| 57 | 57 | 'models' => collect($tagIdsWithModels)->values(), |
| 58 | 58 | ]; |
| 59 | 59 | }) |
| 60 | - ->sortBy(function (array $tagsAndModels) { |
|
| 60 | + ->sortBy(function(array $tagsAndModels) { |
|
| 61 | 61 | return $tagsAndModels['tag']->order_column; |
| 62 | 62 | }) |
| 63 | 63 | ->values(); |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | { |
| 15 | 15 | $this->registerLoader(); |
| 16 | 16 | |
| 17 | - $this->app->singleton('translator', function ($app) { |
|
| 17 | + $this->app->singleton('translator', function($app) { |
|
| 18 | 18 | $loader = $app['translation.loader']; |
| 19 | 19 | |
| 20 | 20 | $locale = $app['config']['app.locale']; |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | protected function registerLoader() |
| 31 | 31 | { |
| 32 | - $this->app->singleton('translation.loader', function ($app) { |
|
| 32 | + $this->app->singleton('translation.loader', function($app) { |
|
| 33 | 33 | return new TranslationLoader($app['files'], $app['path.lang']); |
| 34 | 34 | }); |
| 35 | 35 | } |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | return $constants; |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | - return array_filter($constants, function ($key) use ($startsWithFilter) { |
|
| 102 | + return array_filter($constants, function($key) use ($startsWithFilter) { |
|
| 103 | 103 | return starts_with(strtolower($key), strtolower($startsWithFilter)); |
| 104 | 104 | }, ARRAY_FILTER_USE_KEY); |
| 105 | 105 | } |
@@ -145,15 +145,13 @@ discard block |
||
| 145 | 145 | function login_url(): string |
| 146 | 146 | { |
| 147 | 147 | return request()->isFront() ? |
| 148 | - action('Front\AuthController@getLogin') : |
|
| 149 | - action('Back\AuthController@getLogin'); |
|
| 148 | + action('Front\AuthController@getLogin') : action('Back\AuthController@getLogin'); |
|
| 150 | 149 | } |
| 151 | 150 | |
| 152 | 151 | function logout_url(): string |
| 153 | 152 | { |
| 154 | 153 | return request()->isFront() ? |
| 155 | - action('Front\AuthController@getLogout') : |
|
| 156 | - action('Back\AuthController@getLogout'); |
|
| 154 | + action('Front\AuthController@getLogout') : action('Back\AuthController@getLogout'); |
|
| 157 | 155 | } |
| 158 | 156 | |
| 159 | 157 | function register_url(): string |
@@ -194,8 +192,8 @@ discard block |
||
| 194 | 192 | |
| 195 | 193 | function rgb_to_hex(int $red, int $green, int $blue): string |
| 196 | 194 | { |
| 197 | - return '#' . collect([$red, $green, $blue]) |
|
| 198 | - ->map(function (int $decimal): string { |
|
| 195 | + return '#'.collect([$red, $green, $blue]) |
|
| 196 | + ->map(function(int $decimal): string { |
|
| 199 | 197 | return str_pad(dechex($decimal), 2, STR_PAD_LEFT); |
| 200 | 198 | }) |
| 201 | 199 | ->implode(''); |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | { |
| 22 | 22 | return Cache::rememberForever( |
| 23 | 23 | "article.findByTechnicalName.{$technicalName}", |
| 24 | - function () use ($technicalName): Article { |
|
| 24 | + function() use ($technicalName): Article { |
|
| 25 | 25 | $article = static::where('technical_name', $technicalName)->first(); |
| 26 | 26 | |
| 27 | 27 | if ($article === null) { |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | { |
| 38 | 38 | return Cache::rememberForever( |
| 39 | 39 | "article.getWithTechnicalNameLike.{$technicalName}", |
| 40 | - function () use ($technicalName): Collection { |
|
| 40 | + function() use ($technicalName): Collection { |
|
| 41 | 41 | return static::where('technical_name', 'like', "{$technicalName}.%") |
| 42 | 42 | ->orderBy('order_column') |
| 43 | 43 | ->get(); |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | { |
| 16 | 16 | $this->sendTo( |
| 17 | 17 | $event->user->email, |
| 18 | - 'Welkom bij ' . config('app.url'), |
|
| 18 | + 'Welkom bij '.config('app.url'), |
|
| 19 | 19 | 'emails.auth.front.welcome', |
| 20 | 20 | ['userId' => $event->user->id] |
| 21 | 21 | ); |
@@ -23,8 +23,8 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | public function whenUserWasCreatedThroughBack(UserWasCreatedThroughBack $event) |
| 25 | 25 | { |
| 26 | - Password::broker('front')->sendResetLink(['email' => $event->user->email], function (Message $message) { |
|
| 27 | - $message->subject('Welkom bij ' . config('app.url')); |
|
| 26 | + Password::broker('front')->sendResetLink(['email' => $event->user->email], function(Message $message) { |
|
| 27 | + $message->subject('Welkom bij '.config('app.url')); |
|
| 28 | 28 | }); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -13,17 +13,17 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | public function whenUserWasCreated(UserWasCreated $event) |
| 15 | 15 | { |
| 16 | - Password::broker('back')->sendResetLink(['email' => $event->user->email], function (Message $message) { |
|
| 16 | + Password::broker('back')->sendResetLink(['email' => $event->user->email], function(Message $message) { |
|
| 17 | 17 | $message->subject(fragment('passwords.subjectEmailNewUser')); |
| 18 | 18 | }); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | public function whenContactFormWasSubmitted(ContactFormWasSubmitted $event) |
| 22 | 22 | { |
| 23 | - collect(config('mail.questionFormRecipients'))->each(function (string $email) use ($event) { |
|
| 23 | + collect(config('mail.questionFormRecipients'))->each(function(string $email) use ($event) { |
|
| 24 | 24 | $this->sendMail( |
| 25 | 25 | $email, |
| 26 | - 'Een nieuwe reactie op ' . config('app.url'), |
|
| 26 | + 'Een nieuwe reactie op '.config('app.url'), |
|
| 27 | 27 | 'emails.admin.contactFormSubmitted', |
| 28 | 28 | $event->formResponse->toArray() |
| 29 | 29 | ); |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | public function whenUserWasActivated(UserWasActivated $event) |
| 34 | 34 | { |
| 35 | - collect([])->each(function (string $email) use ($event) { |
|
| 35 | + collect([])->each(function(string $email) use ($event) { |
|
| 36 | 36 | $this->sendMail( |
| 37 | 37 | $email, |
| 38 | 38 | 'Een nieuwe gebruiker heeft zich geregistreerd', |
@@ -15,8 +15,8 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function sendMail($emails, string $subject, string $view, $data = []) |
| 17 | 17 | { |
| 18 | - collect($emails)->each(function (string $email) use ($subject, $view, $data) { |
|
| 19 | - app(Mailer::class)->queue($view, $data, function (Message $message) use ($email, $subject) { |
|
| 18 | + collect($emails)->each(function(string $email) use ($subject, $view, $data) { |
|
| 19 | + app(Mailer::class)->queue($view, $data, function(Message $message) use ($email, $subject) { |
|
| 20 | 20 | $message->to($email)->subject($subject); |
| 21 | 21 | }); |
| 22 | 22 | }); |
@@ -13,10 +13,10 @@ |
||
| 13 | 13 | |
| 14 | 14 | public function whenContactFormWasSubmitted(ContactFormWasSubmitted $event) |
| 15 | 15 | { |
| 16 | - collect(config('mail.questionFormRecipients'))->each(function (string $email) use ($event) { |
|
| 16 | + collect(config('mail.questionFormRecipients'))->each(function(string $email) use ($event) { |
|
| 17 | 17 | $this->sendMail( |
| 18 | 18 | $email, |
| 19 | - 'Een nieuwe reactie op ' . config('app.url'), |
|
| 19 | + 'Een nieuwe reactie op '.config('app.url'), |
|
| 20 | 20 | 'emails.contactFormSubmitted', |
| 21 | 21 | $event->formResponse->toArray() |
| 22 | 22 | ); |
@@ -11,10 +11,10 @@ |
||
| 11 | 11 | |
| 12 | 12 | public function subscribe(Dispatcher $dispatcher) |
| 13 | 13 | { |
| 14 | - collect($this->events)->each(function (string $event) use ($dispatcher) { |
|
| 14 | + collect($this->events)->each(function(string $event) use ($dispatcher) { |
|
| 15 | 15 | $dispatcher->listen( |
| 16 | 16 | $event, |
| 17 | - static::class . '@' . (new ReflectionClass($event))->getShortName() |
|
| 17 | + static::class.'@'.(new ReflectionClass($event))->getShortName() |
|
| 18 | 18 | ); |
| 19 | 19 | }); |
| 20 | 20 | } |