Fix formatting and interfaces in nearly every file

This commit is contained in:
Nabeel Shahzad
2018-03-19 20:50:40 -05:00
parent 04c5b9e7bf
commit ccf56ddec1
331 changed files with 3282 additions and 2492 deletions

View File

@@ -2,13 +2,17 @@
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Interfaces\Controller;
use App\Models\Enums\UserState;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
/**
* Class LoginController
* @package App\Http\Controllers\Auth
*/
class LoginController extends Controller
{
use AuthenticatesUsers;
@@ -44,17 +48,16 @@ class LoginController extends Controller
$user->save();
// TODO: How to handle ON_LEAVE?
if($user->state !== UserState::ACTIVE) {
Log::info('Trying to login '. $user->pilot_id .', state '
. UserState::label($user->state));
if ($user->state !== UserState::ACTIVE) {
Log::info('Trying to login '.$user->pilot_id.', state '
.UserState::label($user->state));
// Log them out
$this->guard()->logout();
$request->session()->invalidate();
// Redirect to one of the error pages
if($user->state === UserState::PENDING) {
if ($user->state === UserState::PENDING) {
return view('auth.pending');
} elseif ($user->state === UserState::REJECTED) {
return view('auth.rejected');