Improve code quality.

This commit is contained in:
James Cole
2018-07-09 19:24:08 +02:00
parent 76386dad7d
commit 5665f127aa
55 changed files with 278 additions and 100 deletions

View File

@@ -74,6 +74,7 @@ class Sandstorm
if (1 === $count && \strlen($userId) > 0) {
// login as first user user.
$user = $repository->first();
/** @noinspection NullPointerExceptionInspection */
Auth::guard($guard)->login($user);
View::share('SANDSTORM_ANON', false);
@@ -83,6 +84,7 @@ class Sandstorm
if (1 === $count && '' === $userId) {
// login but indicate anonymous
$user = User::first();
/** @noinspection NullPointerExceptionInspection */
Auth::guard($guard)->login($user);
View::share('SANDSTORM_ANON', true);