@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | public static function getContentLocale() : string |
| 26 | 26 | { |
| 27 | - if (! static::isValidLocale(locale())) { |
|
| 27 | + if (!static::isValidLocale(locale())) { |
|
| 28 | 28 | return config('app.locales')[0]; |
| 29 | 29 | } |
| 30 | 30 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | protected static function isValidLocale($locale) : bool |
| 35 | 35 | { |
| 36 | - if (! is_string($locale)) { |
|
| 36 | + if (!is_string($locale)) { |
|
| 37 | 37 | return false; |
| 38 | 38 | } |
| 39 | 39 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | |
| 20 | 20 | public function sendPasswordEmail(User $user) |
| 21 | 21 | { |
| 22 | - Password::broker('front')->sendResetLink(['email' => $user->email], function (Message $message) { |
|
| 22 | + Password::broker('front')->sendResetLink(['email' => $user->email], function(Message $message) { |
|
| 23 | 23 | $message->subject('Welkom bij '.request()->getHost()); |
| 24 | 24 | }); |
| 25 | 25 | } |
@@ -38,6 +38,9 @@ |
||
| 38 | 38 | return fragment('auth.failed'); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | + /** |
|
| 42 | + * @param Request $request |
|
| 43 | + */ |
|
| 41 | 44 | protected function sendInactiveAccountResponse($request) |
| 42 | 45 | { |
| 43 | 46 | return redirect()->back() |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | |
| 25 | 25 | protected function authenticated(Request $request, User $user) |
| 26 | 26 | { |
| 27 | - if (! $user->isActive()) { |
|
| 27 | + if (!$user->isActive()) { |
|
| 28 | 28 | auth()->guard('front')->logout(); |
| 29 | 29 | |
| 30 | 30 | return $this->sendInactiveAccountResponse($request); |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | { |
| 58 | 58 | $user = $this->frontUserRepository->find($id); |
| 59 | 59 | |
| 60 | - if (! $user) abort(404); |
|
| 60 | + if (!$user) abort(404); |
|
| 61 | 61 | |
| 62 | 62 | return view('back.frontUsers.edit')->with(compact('user')); |
| 63 | 63 | } |
@@ -57,7 +57,9 @@ |
||
| 57 | 57 | { |
| 58 | 58 | $user = $this->frontUserRepository->find($id); |
| 59 | 59 | |
| 60 | - if (! $user) abort(404); |
|
| 60 | + if (! $user) { |
|
| 61 | + abort(404); |
|
| 62 | + } |
|
| 61 | 63 | |
| 62 | 64 | return view('back.frontUsers.edit')->with(compact('user')); |
| 63 | 65 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -Route::group(['middleware' => 'guest'], function () { |
|
| 3 | +Route::group(['middleware' => 'guest'], function() { |
|
| 4 | 4 | |
| 5 | 5 | Route::get('login', 'AuthController@getLogin'); |
| 6 | 6 | Route::post('login', 'AuthController@postLogin'); |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | Route::get('password/reset/{token}', 'PasswordController@getReset'); |
| 11 | 11 | Route::post('password/reset/{token}', 'PasswordController@postReset'); |
| 12 | 12 | |
| 13 | - Route::get('password', function () { |
|
| 13 | + Route::get('password', function() { |
|
| 14 | 14 | return redirect()->action('PasswordController@getEmail'); |
| 15 | 15 | }); |
| 16 | 16 | }); |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | /** |
| 27 | 27 | * Get the translation for the given locale. If it doesn't exist create it. |
| 28 | 28 | * |
| 29 | - * @param null $locale |
|
| 29 | + * @param string $locale |
|
| 30 | 30 | * @param bool $withFallback |
| 31 | 31 | * |
| 32 | 32 | * @return \Illuminate\Database\Eloquent\Model|null |
@@ -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 | } |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | |
| 15 | 15 | public function boot() |
| 16 | 16 | { |
| 17 | - Validator::extend('tags_exist', function ($attribute, $tagNames, $parameters) { |
|
| 17 | + Validator::extend('tags_exist', function($attribute, $tagNames, $parameters) { |
|
| 18 | 18 | list($tagType) = $parameters; |
| 19 | 19 | $tagType = new TagType($tagType); |
| 20 | 20 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | return true; |
| 31 | 31 | }); |
| 32 | 32 | |
| 33 | - Validator::extend('enum', function ($attribute, $value, $parameters) { |
|
| 33 | + Validator::extend('enum', function($attribute, $value, $parameters) { |
|
| 34 | 34 | |
| 35 | 35 | /** @var \App\Foundation\Models\Enums\Enum $class */ |
| 36 | 36 | $class = $parameters[0]; |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | return $constants; |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | - return array_filter($constants, function ($key) use ($startsWithFilter) { |
|
| 129 | + return array_filter($constants, function($key) use ($startsWithFilter) { |
|
| 130 | 130 | return starts_with(strtolower($key), strtolower($startsWithFilter)); |
| 131 | 131 | }, ARRAY_FILTER_USE_KEY); |
| 132 | 132 | } |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | /** @return \App\Services\Auth\Front\User|null */ |
| 166 | 166 | function current_front_user() |
| 167 | 167 | { |
| 168 | - if (! auth()->guard('front')->check()) { |
|
| 168 | + if (!auth()->guard('front')->check()) { |
|
| 169 | 169 | return null; |
| 170 | 170 | } |
| 171 | 171 | |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | /** @return \App\Services\Auth\Back\User|null */ |
| 176 | 176 | function current_back_user() |
| 177 | 177 | { |
| 178 | - if (! auth()->guard('back')->check()) { |
|
| 178 | + if (!auth()->guard('back')->check()) { |
|
| 179 | 179 | return null; |
| 180 | 180 | } |
| 181 | 181 | |
@@ -185,15 +185,13 @@ discard block |
||
| 185 | 185 | function login_url() : string |
| 186 | 186 | { |
| 187 | 187 | return request()->isFront() ? |
| 188 | - action('Front\AuthController@getLogin') : |
|
| 189 | - action('Back\AuthController@getLogin'); |
|
| 188 | + action('Front\AuthController@getLogin') : action('Back\AuthController@getLogin'); |
|
| 190 | 189 | } |
| 191 | 190 | |
| 192 | 191 | function logout_url() : string |
| 193 | 192 | { |
| 194 | 193 | return request()->isFront() ? |
| 195 | - action('Front\AuthController@getLogout') : |
|
| 196 | - action('Back\AuthController@getLogout'); |
|
| 194 | + action('Front\AuthController@getLogout') : action('Back\AuthController@getLogout'); |
|
| 197 | 195 | } |
| 198 | 196 | |
| 199 | 197 | function register_url() : string |
@@ -224,7 +222,7 @@ discard block |
||
| 224 | 222 | |
| 225 | 223 | function lang_to_fragments(string $namespace, array $names, array $defaults = []) : array |
| 226 | 224 | { |
| 227 | - return array_reduce($names, function ($carry, $name) use ($namespace) { |
|
| 225 | + return array_reduce($names, function($carry, $name) use ($namespace) { |
|
| 228 | 226 | $carry[$name] = fragment("{$namespace}.{$name}"); |
| 229 | 227 | |
| 230 | 228 | return $carry; |