Fixed formatting of almost every file

This commit is contained in:
Nabeel Shahzad 2018-02-20 22:33:09 -06:00
parent c5b6ca53fa
commit ea09a18956
138 changed files with 600 additions and 508 deletions

View File

@ -2,8 +2,8 @@
namespace App\Bootstrap;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Contracts\Config\Repository as RepositoryContract;
use Illuminate\Contracts\Foundation\Application;
/**
* Class LoadConfiguration

View File

@ -2,11 +2,10 @@
namespace App\Console\Commands;
use Illuminate\Database\Eloquent\Collection;
use GuzzleHttp\Client;
use App\Console\BaseCommand;
use App\Facades\Utils;
use GuzzleHttp\Client;
use Illuminate\Database\Eloquent\Collection;
class AcarsReplay extends BaseCommand
{

View File

@ -2,9 +2,8 @@
namespace App\Console\Commands;
use Log;
use App\Console\BaseCommand;
use Log;
class CreateDatabase extends BaseCommand
{

View File

@ -2,15 +2,13 @@
namespace App\Console\Commands;
use DB;
use PDO;
use App\Models\Airline;
use App\Models\User;
use App\Console\BaseCommand;
use App\Models\Acars;
use App\Models\Airline;
use App\Models\Pirep;
use App\Models\User;
use DB;
use PDO;
class DevCommands extends BaseCommand
{

View File

@ -2,7 +2,6 @@
namespace App\Console\Commands;
use DB;
use App\Console\BaseCommand;
use App\Services\DatabaseService;

View File

@ -2,7 +2,6 @@
namespace App\Console\Commands;
use DB;
use App\Console\BaseCommand;
class Importer extends BaseCommand

View File

@ -3,9 +3,8 @@
namespace App\Console\Commands;
use App\Console\BaseCommand;
use App\Models\Navdata;
use App\Models\Enums\NavaidType;
use App\Models\Navdata;
class NavdataCommand extends BaseCommand
{

View File

@ -2,8 +2,8 @@
namespace App\Console\Commands;
use GuzzleHttp\Client;
use App\Console\BaseCommand;
use GuzzleHttp\Client;
class TestApi extends BaseCommand
{

View File

@ -2,8 +2,8 @@
namespace App\Console\Services;
use PDO;
use Doctrine\DBAL\Driver\PDOException;
use PDO;
/**
* Class Database

View File

@ -2,26 +2,25 @@
namespace App\Console\Services;
use PDO;
use Carbon\Carbon;
use Doctrine\DBAL\Driver\PDOException;
use Illuminate\Support\Str;
use Illuminate\Database\QueryException;
use Illuminate\Support\Facades\Hash;
use Symfony\Component\Console\Output\ConsoleOutput;
use App\Models\Enums\FlightType;
use App\Models\Enums\PirepSource;
use App\Models\Pirep;
use App\Facades\Utils;
use App\Models\Aircraft;
use App\Models\Airline;
use App\Models\Airport;
use App\Models\Enums\FlightType;
use App\Models\Enums\PirepSource;
use App\Models\Enums\UserState;
use App\Models\Flight;
use App\Models\Pirep;
use App\Models\Rank;
use App\Models\Subfleet;
use App\Models\User;
use App\Models\Enums\UserState;
use App\Facades\Utils;
use Carbon\Carbon;
use Doctrine\DBAL\Driver\PDOException;
use Illuminate\Database\QueryException;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
use PDO;
use Symfony\Component\Console\Output\ConsoleOutput;
/**
* Class Importer

View File

@ -1,8 +1,8 @@
<?php
use App\Models\Migrations\Migration;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUsersTable extends Migration
{

View File

@ -1,8 +1,8 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePasswordResetsTable extends Migration
{

View File

@ -1,8 +1,8 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSessionsTable extends Migration
{

View File

@ -1,7 +1,6 @@
<?php
use \App\Models\Enums\AircraftState;
use App\Models\Enums\AircraftState;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

View File

@ -1,7 +1,6 @@
<?php
use App\Models\Enums\FlightType;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

View File

@ -3,7 +3,6 @@
use App\Models\Enums\FlightType;
use App\Models\Enums\PirepState;
use App\Models\Enums\PirepStatus;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

View File

@ -1,8 +1,8 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateBidsTable extends Migration
{

View File

@ -1,8 +1,8 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateJobsTable extends Migration
{

View File

@ -1,8 +1,8 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateFailedJobsTable extends Migration
{

View File

@ -1,8 +1,8 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateNavdataTables extends Migration
{

View File

@ -1,8 +1,8 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAcarsTables extends Migration
{

View File

@ -1,8 +1,8 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateNewsTable extends Migration
{

View File

@ -3,9 +3,9 @@
namespace App\Events;
use App\Models\Pirep;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
class PirepAccepted
{

View File

@ -3,9 +3,9 @@
namespace App\Events;
use App\Models\Pirep;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
class PirepFiled
{

View File

@ -3,9 +3,9 @@
namespace App\Events;
use App\Models\Pirep;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
class PirepRejected
{

View File

@ -3,9 +3,9 @@
namespace App\Events;
use App\Models\User;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
class TestEvent
{

View File

@ -3,9 +3,9 @@
namespace App\Events;
use App\Models\User;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
class UserAccepted
{

View File

@ -3,9 +3,9 @@
namespace App\Events;
use App\Models\User;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
class UserRegistered
{

View File

@ -3,9 +3,9 @@
namespace App\Events;
use App\Models\User;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
/**
* Event triggered when a user's state changes

View File

@ -3,9 +3,9 @@
namespace App\Events;
use App\Models\User;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
class UserStatsChanged
{

View File

@ -2,12 +2,12 @@
namespace App\Exceptions;
use \Illuminate\Validation\ValidationException;
use Log;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Exception;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Illuminate\Validation\ValidationException;
use Log;
class Handler extends ExceptionHandler
{

View File

@ -5,7 +5,6 @@
namespace App\Exceptions;
class SettingNotFound extends \Exception
{

View File

@ -3,7 +3,7 @@
namespace App\Facades;
use GuzzleHttp\Client;
use \Illuminate\Support\Facades\Facade;
use Illuminate\Support\Facades\Facade;
class Utils extends Facade
{

View File

@ -2,12 +2,12 @@
namespace App\Http\Controllers\Admin;
use App\Models\Subfleet;
use App\Http\Requests\CreateAircraftRequest;
use App\Http\Requests\UpdateAircraftRequest;
use App\Models\Subfleet;
use App\Repositories\AircraftRepository;
use Illuminate\Http\Request;
use Flash;
use Illuminate\Http\Request;
use Prettus\Repository\Criteria\RequestCriteria;
@ -15,6 +15,10 @@ class AircraftController extends BaseController
{
private $aircraftRepository;
/**
* AircraftController constructor.
* @param AircraftRepository $aircraftRepo
*/
public function __construct(
AircraftRepository $aircraftRepo
) {

View File

@ -2,23 +2,27 @@
namespace App\Http\Controllers\Admin;
use App\Support\Countries;
use Flash;
use Response;
use Illuminate\Http\Request;
use Prettus\Repository\Criteria\RequestCriteria;
use App\Http\Requests\CreateAirlineRequest;
use App\Http\Requests\UpdateAirlineRequest;
use App\Repositories\AirlineRepository;
use App\Support\Countries;
use Flash;
use Illuminate\Http\Request;
use Prettus\Repository\Criteria\RequestCriteria;
use Response;
class AirlinesController extends BaseController
{
/** @var AirlineRepository */
private $airlineRepo;
public function __construct(AirlineRepository $airlinesRepo)
{
/**
* AirlinesController constructor.
* @param AirlineRepository $airlinesRepo
*/
public function __construct(
AirlineRepository $airlinesRepo
) {
$this->airlineRepo = $airlinesRepo;
}
@ -59,9 +63,7 @@ class AirlinesController extends BaseController
/**
* Display the specified Airlines.
*
* @param int $id
*
* @return mixed
*/
public function show($id)

View File

@ -2,12 +2,11 @@
namespace App\Http\Controllers\Admin;
use Log;
use Flash;
use App\Http\Requests\CreateAirportRequest;
use App\Http\Requests\UpdateAirportRequest;
use App\Repositories\AirportRepository;
use App\Repositories\Criteria\WhereCriteria;
use Flash;
use Illuminate\Http\Request;
use Jackiedo\Timezonelist\Facades\Timezonelist;
use Response;
@ -18,14 +17,18 @@ class AirportController extends BaseController
/** @var AirportRepository */
private $airportRepository;
public function __construct(AirportRepository $airportRepo)
{
/**
* AirportController constructor.
* @param AirportRepository $airportRepo
*/
public function __construct(
AirportRepository $airportRepo
) {
$this->airportRepository = $airportRepo;
}
/**
* Display a listing of the Airport.
*
* @param Request $request
* @return Response
* @throws \Prettus\Repository\Exceptions\RepositoryException
@ -47,7 +50,6 @@ class AirportController extends BaseController
/**
* Show the form for creating a new Airport.
*
* @return Response
*/
public function create()
@ -158,6 +160,11 @@ class AirportController extends BaseController
return redirect(route('admin.airports.index'));
}
/**
* Set fuel prices for this airport
* @param Request $request
* @return mixed
*/
public function fuel(Request $request)
{
$id = $request->id;

View File

@ -2,23 +2,27 @@
namespace App\Http\Controllers\Admin;
use Auth;
use Flash;
use Log;
use Version;
use Illuminate\Http\Request;
use App\Facades\Utils;
use App\Repositories\NewsRepository;
use App\Repositories\PirepRepository;
use App\Repositories\UserRepository;
use Auth;
use Flash;
use Illuminate\Http\Request;
use Log;
use Version;
use vierbergenlars\SemVer\version as semver;
class DashboardController extends BaseController
{
private $newsRepo, $pirepRepo, $userRepo;
/**
* DashboardController constructor.
* @param NewsRepository $newsRepo
* @param PirepRepository $pirepRepo
* @param UserRepository $userRepo
*/
public function __construct(
NewsRepository $newsRepo,
PirepRepository $pirepRepo,

View File

@ -5,8 +5,8 @@ namespace App\Http\Controllers\Admin;
use App\Http\Requests\CreateFareRequest;
use App\Http\Requests\UpdateFareRequest;
use App\Repositories\FareRepository;
use Illuminate\Http\Request;
use Flash;
use Illuminate\Http\Request;
use Prettus\Repository\Criteria\RequestCriteria;
use Response;
@ -15,17 +15,21 @@ class FareController extends BaseController
/** @var FareRepository */
private $fareRepository;
public function __construct(FareRepository $fareRepo)
{
/**
* FareController constructor.
* @param FareRepository $fareRepo
*/
public function __construct(
FareRepository $fareRepo
) {
$this->fareRepository = $fareRepo;
}
/**
* Display a listing of the Fare.
*
* @param Request $request
*
* @return Response
* @throws \Prettus\Repository\Exceptions\RepositoryException
*/
public function index(Request $request)
{
@ -48,10 +52,9 @@ class FareController extends BaseController
/**
* Store a newly created Fare in storage.
*
* @param CreateFareRequest $request
*
* @return Response
* @throws \Prettus\Validator\Exceptions\ValidatorException
*/
public function store(CreateFareRequest $request)
{
@ -64,9 +67,7 @@ class FareController extends BaseController
/**
* Display the specified Fare.
*
* @param int $id
*
* @return Response
*/
public function show($id)
@ -82,9 +83,7 @@ class FareController extends BaseController
/**
* Show the form for editing the specified Fare.
*
* @param int $id
*
* @return Response
*/
public function edit($id)
@ -100,11 +99,10 @@ class FareController extends BaseController
/**
* Update the specified Fare in storage.
*
* @param int $id
* @param int $id
* @param UpdateFareRequest $request
*
* @return Response
* @throws \Prettus\Validator\Exceptions\ValidatorException
*/
public function update($id, UpdateFareRequest $request)
{
@ -122,9 +120,7 @@ class FareController extends BaseController
/**
* Remove the specified Fare from storage.
*
* @param int $id
*
* @return Response
*/
public function destroy($id)

View File

@ -2,24 +2,21 @@
namespace App\Http\Controllers\Admin;
use App\Facades\Utils;
use App\Http\Requests\CreateFlightRequest;
use App\Http\Requests\UpdateFlightRequest;
use App\Models\Enums\FlightType;
use App\Models\Flight;
use App\Models\FlightFields;
use App\Http\Requests\CreateFlightRequest;
use App\Http\Requests\UpdateFlightRequest;
use App\Repositories\AirlineRepository;
use App\Repositories\AirportRepository;
use App\Repositories\FareRepository;
use App\Repositories\FlightRepository;
use App\Repositories\SubfleetRepository;
use App\Services\FareService;
use App\Services\FlightService;
use App\Support\Units\Time;
use Illuminate\Http\Request;
use Flash;
use Illuminate\Http\Request;
use Response;
class FlightController extends BaseController
@ -32,6 +29,16 @@ class FlightController extends BaseController
$flightSvc,
$subfleetRepo;
/**
* FlightController constructor.
* @param AirlineRepository $airlineRepo
* @param AirportRepository $airportRepo
* @param FareRepository $fareRepo
* @param FlightRepository $flightRepo
* @param FareService $fareSvc
* @param FlightService $flightSvc
* @param SubfleetRepository $subfleetRepo
*/
public function __construct(
AirlineRepository $airlineRepo,
AirportRepository $airportRepo,
@ -50,6 +57,10 @@ class FlightController extends BaseController
$this->subfleetRepo = $subfleetRepo;
}
/**
* @param $flight
* @return array
*/
protected function getAvailSubfleets($flight)
{
$retval = [];
@ -82,7 +93,6 @@ class FlightController extends BaseController
/**
* Show the form for creating a new Flight.
*
* @return Response
*/
public function create()
@ -136,7 +146,7 @@ class FlightController extends BaseController
/**
* @param $id
* @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View
* @return mixed
*/
public function show($id)
{
@ -156,7 +166,7 @@ class FlightController extends BaseController
/**
* @param $id
* @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View
* @return mixed
*/
public function edit($id)
{
@ -252,7 +262,7 @@ class FlightController extends BaseController
/**
* @param $flight
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
* @return mixed
*/
protected function return_fields_view($flight)
{
@ -264,7 +274,7 @@ class FlightController extends BaseController
/**
* @param Request $request
* @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View
* @return mixed
*/
public function fields(Request $request)
{
@ -316,7 +326,7 @@ class FlightController extends BaseController
/**
* @param $id
* @param Request $request
* @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View
* @return mixed
*/
public function subfleets($id, Request $request)
{

View File

@ -2,30 +2,25 @@
namespace App\Http\Controllers\Admin;
use App\Services\UserService;
use App\Support\Units\Time;
use Log;
use Flash;
use Response;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Prettus\Repository\Criteria\RequestCriteria;
use App\Services\PIREPService;
use App\Models\PirepComment;
use App\Models\Enums\PirepState;
use App\Facades\Utils;
use App\Http\Requests\CreatePirepRequest;
use App\Http\Requests\UpdatePirepRequest;
use App\Models\Enums\PirepState;
use App\Models\PirepComment;
use App\Repositories\AircraftRepository;
use App\Repositories\AirlineRepository;
use App\Repositories\AirportRepository;
use App\Repositories\PirepRepository;
use App\Repositories\SubfleetRepository;
use App\Facades\Utils;
use App\Services\PIREPService;
use App\Services\UserService;
use App\Support\Units\Time;
use Flash;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Log;
use Prettus\Repository\Criteria\RequestCriteria;
use Response;
class PirepController extends BaseController
@ -38,6 +33,16 @@ class PirepController extends BaseController
$subfleetRepo,
$userSvc;
/**
* PirepController constructor.
* @param AirportRepository $airportRepo
* @param AirlineRepository $airlineRepo
* @param AircraftRepository $aircraftRepo
* @param PirepRepository $pirepRepo
* @param PIREPService $pirepSvc
* @param SubfleetRepository $subfleetRepo
* @param UserService $userSvc
*/
public function __construct(
AirportRepository $airportRepo,
AirlineRepository $airlineRepo,
@ -284,7 +289,8 @@ class PirepController extends BaseController
* Add a comment to the Pirep
* @param $id
* @param Request $request
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
* @return mixed
* @throws \Exception
*/
public function comments($id, Request $request)
{

View File

@ -5,8 +5,8 @@ namespace App\Http\Controllers\Admin;
use App\Http\Requests\CreatePirepFieldRequest;
use App\Http\Requests\UpdatePirepFieldRequest;
use App\Repositories\PirepFieldRepository;
use Illuminate\Http\Request;
use Flash;
use Illuminate\Http\Request;
use Prettus\Repository\Criteria\RequestCriteria;
use Response;
@ -15,8 +15,13 @@ class PirepFieldController extends BaseController
/** @var PirepFieldRepository */
private $pirepFieldRepo;
public function __construct(PirepFieldRepository $pirepFieldRepo)
{
/**
* PirepFieldController constructor.
* @param PirepFieldRepository $pirepFieldRepo
*/
public function __construct(
PirepFieldRepository $pirepFieldRepo
){
$this->pirepFieldRepo = $pirepFieldRepo;
}
@ -59,7 +64,7 @@ class PirepFieldController extends BaseController
$this->pirepFieldRepo->create($attrs);
Flash::success('PirepField saved successfully.');
Flash::success('Field added successfully.');
return redirect(route('admin.pirepfields.index'));
}
@ -92,7 +97,7 @@ class PirepFieldController extends BaseController
$field = $this->pirepFieldRepo->findWithoutFail($id);
if (empty($field)) {
Flash::error('PirepField not found');
Flash::error('Field not found');
return redirect(route('admin.pirepfields.index'));
}
@ -119,7 +124,7 @@ class PirepFieldController extends BaseController
$attrs['required'] = get_truth_state($attrs['required']);
$this->pirepFieldRepo->update($attrs, $id);
Flash::success('PirepField updated successfully.');
Flash::success('Field updated successfully.');
return redirect(route('admin.pirepfields.index'));
}
@ -133,13 +138,13 @@ class PirepFieldController extends BaseController
$field = $this->pirepFieldRepo->findWithoutFail($id);
if (empty($field)) {
Flash::error('PirepField not found');
Flash::error('Field not found');
return redirect(route('admin.pirepfields.index'));
}
$this->pirepFieldRepo->delete($id);
Flash::success('PirepField deleted successfully.');
Flash::success('Field deleted successfully.');
return redirect(route('admin.pirepfields.index'));
}
}

View File

@ -2,22 +2,26 @@
namespace App\Http\Controllers\Admin;
use Cache;
use Flash;
use Response;
use Illuminate\Http\Request;
use Prettus\Repository\Criteria\RequestCriteria;
use App\Http\Requests\CreateRankRequest;
use App\Http\Requests\UpdateRankRequest;
use App\Repositories\RankRepository;
use App\Repositories\SubfleetRepository;
use Cache;
use Flash;
use Illuminate\Http\Request;
use Prettus\Repository\Criteria\RequestCriteria;
use Response;
class RankController extends BaseController
{
/** @var RankRepository */
private $rankRepository, $subfleetRepo;
/**
* RankController constructor.
* @param RankRepository $rankingRepo
* @param SubfleetRepository $subfleetRepo
*/
public function __construct(
RankRepository $rankingRepo,
SubfleetRepository $subfleetRepo
@ -26,6 +30,11 @@ class RankController extends BaseController
$this->subfleetRepo = $subfleetRepo;
}
/**
* Get the available subfleets for a rank
* @param $rank
* @return array
*/
protected function getAvailSubfleets($rank)
{
$retval = [];
@ -69,6 +78,7 @@ class RankController extends BaseController
* Store a newly created Ranking in storage.
* @param CreateRankRequest $request
* @return Response
* @throws \Prettus\Validator\Exceptions\ValidatorException
*/
public function store(CreateRankRequest $request)
{
@ -84,9 +94,7 @@ class RankController extends BaseController
/**
* Display the specified Ranking.
*
* @param int $id
*
* @return Response
*/
public function show($id)
@ -105,9 +113,7 @@ class RankController extends BaseController
/**
* Show the form for editing the specified Ranking.
*
* @param int $id
*
* @return Response
*/
public function edit($id)
@ -128,11 +134,10 @@ class RankController extends BaseController
/**
* Update the specified Ranking in storage.
*
* @param int $id
* @param int $id
* @param UpdateRankRequest $request
*
* @return Response
* @throws \Prettus\Validator\Exceptions\ValidatorException
*/
public function update($id, UpdateRankRequest $request)
{
@ -152,9 +157,7 @@ class RankController extends BaseController
/**
* Remove the specified Ranking from storage.
*
* @param int $id
*
* @return Response
*/
public function destroy($id)
@ -172,6 +175,10 @@ class RankController extends BaseController
return redirect(route('admin.ranks.index'));
}
/**
* @param $rank
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
protected function return_subfleet_view($rank)
{
$avail_subfleets = $this->getAvailSubfleets($rank);
@ -181,10 +188,14 @@ class RankController extends BaseController
]);
}
public function subfleets(Request $request)
/**
* Subfleet operations on a rank
* @param $id
* @param Request $request
* @return mixed
*/
public function subfleets($id, Request $request)
{
$id = $request->id;
$rank = $this->rankRepository->findWithoutFail($id);
if (empty($rank)) {
Flash::error('Rank not found!');

View File

@ -2,10 +2,9 @@
namespace App\Http\Controllers\Admin;
use Log;
use Illuminate\Http\Request;
use App\Models\Setting;
use Illuminate\Http\Request;
use Log;
class SettingsController extends BaseController
{
@ -24,6 +23,8 @@ class SettingsController extends BaseController
/**
* Update the specified setting in storage.
* @param Request $request
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
*/
public function update(Request $request)
{
@ -41,5 +42,4 @@ class SettingsController extends BaseController
flash('Settings saved!');
return redirect('/admin/settings');
}
}

View File

@ -2,25 +2,20 @@
namespace App\Http\Controllers\Admin;
use App\Repositories\RankRepository;
use Illuminate\Http\Request;
use Flash;
use Prettus\Repository\Criteria\RequestCriteria;
use Response;
use App\Models\Enums\FuelType;
use App\Models\Airline;
use App\Models\Subfleet;
use App\Http\Requests\CreateSubfleetRequest;
use App\Http\Requests\UpdateSubfleetRequest;
use App\Models\Airline;
use App\Models\Enums\FuelType;
use App\Models\Subfleet;
use App\Repositories\AircraftRepository;
use App\Repositories\FareRepository;
use App\Repositories\RankRepository;
use App\Repositories\SubfleetRepository;
use App\Services\FareService;
use Flash;
use Illuminate\Http\Request;
use Prettus\Repository\Criteria\RequestCriteria;
use Response;
class SubfleetController extends BaseController
{
@ -29,7 +24,6 @@ class SubfleetController extends BaseController
/**
* SubfleetController constructor.
*
* @param AircraftRepository $aircraftRepo
* @param SubfleetRepository $subfleetRepo
* @param FareRepository $fareRepo
@ -102,7 +96,6 @@ class SubfleetController extends BaseController
/**
* Show the form for creating a new Subfleet.
*
* @return Response
*/
public function create()

View File

@ -3,28 +3,24 @@
namespace App\Http\Controllers\Admin;
use App\Facades\Utils;
use App\Models\User;
use DB;
use Hash;
use Illuminate\Support\Facades\Auth;
use Log;
use Flash;
use Prettus\Repository\Exceptions\RepositoryException;
use Response;
use Jackiedo\Timezonelist\Facades\Timezonelist;
use Illuminate\Http\Request;
use App\Http\Requests\CreateUserRequest;
use App\Http\Requests\UpdateUserRequest;
use App\Models\Airline;
use App\Models\Airport;
use App\Models\Rank;
use App\Models\Role;
use App\Models\User;
use App\Repositories\PirepRepository;
use App\Repositories\UserRepository;
use App\Services\UserService;
use App\Models\Airport;
use App\Models\Airline;
use App\Models\Rank;
use App\Models\Role;
use DB;
use Flash;
use Hash;
use Illuminate\Http\Request;
use Jackiedo\Timezonelist\Facades\Timezonelist;
use Log;
use Prettus\Repository\Exceptions\RepositoryException;
use Response;
class UserController extends BaseController
{
@ -34,7 +30,6 @@ class UserController extends BaseController
/**
* UserController constructor.
*
* @param UserRepository $userRepo
*/
public function __construct(
@ -47,6 +42,10 @@ class UserController extends BaseController
$this->userRepo = $userRepo;
}
/**
* @param Request $request
* @return mixed
*/
public function index(Request $request)
{
try {
@ -82,7 +81,7 @@ class UserController extends BaseController
public function store(CreateUserRequest $request)
{
$input = $request->all();
$User = $this->userRepo->create($input);
$user = $this->userRepo->create($input);
Flash::success('User saved successfully.');
return redirect(route('admin.users.index'));
@ -120,9 +119,7 @@ class UserController extends BaseController
/**
* Show the form for editing the specified User.
*
* @param int $id
*
* @return Response
*/
public function edit($id)
@ -157,11 +154,10 @@ class UserController extends BaseController
/**
* Update the specified User in storage.
*
* @param int $id
* @param int $id
* @param UpdateUserRequest $request
*
* @return Response
* @throws \Prettus\Validator\Exceptions\ValidatorException
*/
public function update($id, UpdateUserRequest $request)
{
@ -199,9 +195,7 @@ class UserController extends BaseController
/**
* Remove the specified User from storage.
*
* @param int $id
*
* @return Response
*/
public function destroy($id)
@ -221,6 +215,9 @@ class UserController extends BaseController
/**
* Regenerate the user's API key
* @param $id
* @param Request $request
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
*/
public function regen_apikey($id, Request $request)
{

View File

@ -2,17 +2,22 @@
namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Services\GeoService;
use App\Repositories\AcarsRepository;
use App\Repositories\PirepRepository;
use App\Services\GeoService;
use Illuminate\Http\Request;
class AcarsController extends RestController
{
protected $acarsRepo, $geoSvc, $pirepRepo;
/**
* AcarsController constructor.
* @param GeoService $geoSvc
* @param AcarsRepository $acarsRepo
* @param PirepRepository $pirepRepo
*/
public function __construct(
GeoService $geoSvc,
AcarsRepository $acarsRepo,
@ -25,6 +30,8 @@ class AcarsController extends RestController
/**
* Return all of the flights (as points) in GeoJSON format
* @param Request $request
* @return mixed
*/
public function index(Request $request)
{

View File

@ -2,21 +2,28 @@
namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Repositories\AirlineRepository;
use App\Http\Resources\Airline as AirlineResource;
use App\Repositories\AirlineRepository;
use Illuminate\Http\Request;
class AirlineController extends RestController
{
protected $airlineRepo;
public function __construct(AirlineRepository $airlineRepo) {
/**
* AirlineController constructor.
* @param AirlineRepository $airlineRepo
*/
public function __construct(
AirlineRepository $airlineRepo
) {
$this->airlineRepo = $airlineRepo;
}
/**
* Return all the airlines, paginated
* @param Request $request
* @return mixed
*/
public function index(Request $request)
{

View File

@ -2,19 +2,21 @@
namespace App\Http\Controllers\Api;
use Log;
use App\Http\Resources\Airport as AirportResource;
use App\Repositories\AirportRepository;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use App\Repositories\AirportRepository;
use App\Http\Resources\Airport as AirportResource;
use Log;
use VaCentral\Airport as AirportLookup;
class AirportController extends RestController
{
protected $airportRepo;
/**
* AirportController constructor.
* @param AirportRepository $airportRepo
*/
public function __construct(
AirportRepository $airportRepo
) {
@ -23,6 +25,8 @@ class AirportController extends RestController
/**
* Return all the airports, paginated
* @param Request $request
* @return mixed
*/
public function index(Request $request)
{
@ -38,6 +42,9 @@ class AirportController extends RestController
return AirportResource::collection($airports);
}
/**
* @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection
*/
public function index_hubs()
{
$where = [

View File

@ -2,18 +2,21 @@
namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Repositories\AircraftRepository;
use App\Repositories\SubfleetRepository;
use App\Http\Resources\Aircraft as AircraftResource;
use App\Http\Resources\Subfleet as SubfleetResource;
use App\Repositories\AircraftRepository;
use App\Repositories\SubfleetRepository;
use Illuminate\Http\Request;
class FleetController extends RestController
{
protected $aircraftRepo, $subfleetRepo;
/**
* FleetController constructor.
* @param AircraftRepository $aircraftRepo
* @param SubfleetRepository $subfleetRepo
*/
public function __construct(
AircraftRepository $aircraftRepo,
SubfleetRepository $subfleetRepo

View File

@ -2,19 +2,17 @@
namespace App\Http\Controllers\Api;
use App\Http\Resources\Flight as FlightResource;
use App\Http\Resources\Navdata as NavdataResource;
use App\Repositories\Criteria\WhereCriteria;
use App\Repositories\FlightRepository;
use App\Services\FlightService;
use App\Services\UserService;
use Auth;
use Illuminate\Http\Request;
use Prettus\Repository\Criteria\RequestCriteria;
use Prettus\Repository\Exceptions\RepositoryException;
use App\Services\UserService;
use App\Repositories\FlightRepository;
use App\Http\Resources\Flight as FlightResource;
use App\Http\Resources\Navdata as NavdataResource;
/**
* Class FlightController
* @package App\Http\Controllers\Api
@ -23,6 +21,12 @@ class FlightController extends RestController
{
protected $flightRepo, $flightSvc, $userSvc;
/**
* FlightController constructor.
* @param FlightRepository $flightRepo
* @param FlightService $flightSvc
* @param UserService $userSvc
*/
public function __construct(
FlightRepository $flightRepo,
FlightService $flightSvc,

View File

@ -2,38 +2,32 @@
namespace App\Http\Controllers\Api;
use App\Http\Requests\Acars\EventRequest;
use App\Http\Requests\Acars\UpdateRequest;
use App\Models\Enums\PirepSource;
use App\Services\UserService;
use Auth;
use Log;
use Illuminate\Http\Request;
use App\Http\Requests\Acars\CommentRequest;
use App\Http\Requests\Acars\EventRequest;
use App\Http\Requests\Acars\FileRequest;
use App\Http\Requests\Acars\LogRequest;
use App\Http\Requests\Acars\PositionRequest;
use App\Http\Requests\Acars\PrefileRequest;
use App\Http\Requests\Acars\RouteRequest;
use App\Models\Acars;
use App\Models\Pirep;
use App\Models\PirepComment;
use App\Models\Enums\AcarsType;
use App\Models\Enums\PirepState;
use App\Models\Enums\PirepStatus;
use App\Services\GeoService;
use App\Services\PIREPService;
use App\Repositories\AcarsRepository;
use App\Repositories\PirepRepository;
use App\Http\Requests\Acars\UpdateRequest;
use App\Http\Resources\AcarsRoute as AcarsRouteResource;
use App\Http\Resources\Pirep as PirepResource;
use App\Http\Resources\PirepComment as PirepCommentResource;
use App\Http\Resources\AcarsRoute as AcarsRouteResource;
use App\Models\Acars;
use App\Models\Enums\AcarsType;
use App\Models\Enums\PirepSource;
use App\Models\Enums\PirepState;
use App\Models\Enums\PirepStatus;
use App\Models\Pirep;
use App\Models\PirepComment;
use App\Repositories\AcarsRepository;
use App\Repositories\PirepRepository;
use App\Services\GeoService;
use App\Services\PIREPService;
use App\Services\UserService;
use Auth;
use Illuminate\Http\Request;
use Log;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
class PirepController extends RestController
@ -50,6 +44,7 @@ class PirepController extends RestController
* @param GeoService $geoSvc
* @param PirepRepository $pirepRepo
* @param PIREPService $pirepSvc
* @param UserService $userSvc
*/
public function __construct(
AcarsRepository $acarsRepo,
@ -435,7 +430,7 @@ class PirepController extends RestController
/**
* @param $id
* @param Request $request
* @return AcarsRouteResource
* @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection
*/
public function route_get($id, Request $request)
{

View File

@ -1,10 +1,4 @@
<?php
/**
* Created by IntelliJ IDEA.
* User: nabeelshahzad
* Date: 1/4/18
* Time: 4:20 PM
*/
namespace App\Http\Controllers\Api;

View File

@ -2,21 +2,28 @@
namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Repositories\SettingRepository;
use App\Http\Resources\Setting as SettingResource;
use App\Repositories\SettingRepository;
use Illuminate\Http\Request;
class SettingsController extends RestController
{
protected $settingRepo;
public function __construct(SettingRepository $settingRepo) {
/**
* SettingsController constructor.
* @param SettingRepository $settingRepo
*/
public function __construct(
SettingRepository $settingRepo
) {
$this->settingRepo = $settingRepo;
}
/**
* Return all the airlines, paginated
* @param Request $request
* @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection
*/
public function index(Request $request)
{

View File

@ -6,6 +6,9 @@ use PragmaRX\Version\Package\Facade as Version;
class StatusController extends RestController
{
/**
* @return \Illuminate\Http\JsonResponse
*/
public function status()
{
return response()->json([

View File

@ -2,22 +2,19 @@
namespace App\Http\Controllers\Api;
use App\Models\Enums\PirepState;
use App\Repositories\Criteria\WhereCriteria;
use App\Repositories\PirepRepository;
use App\Repositories\SubfleetRepository;
use App\Services\UserService;
use Auth;
use Illuminate\Http\Request;
use App\Repositories\UserRepository;
use App\Models\UserBid;
use App\Http\Resources\Flight as FlightResource;
use App\Http\Resources\Pirep as PirepResource;
use App\Http\Resources\Subfleet as SubfleetResource;
use App\Http\Resources\User as UserResource;
use App\Models\Enums\PirepState;
use App\Models\UserBid;
use App\Repositories\Criteria\WhereCriteria;
use App\Repositories\PirepRepository;
use App\Repositories\SubfleetRepository;
use App\Repositories\UserRepository;
use App\Services\UserService;
use Auth;
use Illuminate\Http\Request;
use Prettus\Repository\Criteria\RequestCriteria;
use Prettus\Repository\Exceptions\RepositoryException;
@ -29,6 +26,13 @@ class UserController extends RestController
$userRepo,
$userSvc;
/**
* UserController constructor.
* @param PirepRepository $pirepRepo
* @param SubfleetRepository $subfleetRepo
* @param UserRepository $userRepo
* @param UserService $userSvc
*/
public function __construct(
PirepRepository $pirepRepo,
SubfleetRepository $subfleetRepo,
@ -56,6 +60,8 @@ class UserController extends RestController
/**
* Return the profile for the currently auth'd user
* @param Request $request
* @return UserResource
*/
public function index(Request $request)
{
@ -64,6 +70,8 @@ class UserController extends RestController
/**
* Get the profile for the passed-in user
* @param $id
* @return UserResource
*/
public function get($id)
{

View File

@ -9,11 +9,17 @@ class ForgotPasswordController extends Controller
{
use SendsPasswordResetEmails;
/**
* ForgotPasswordController constructor.
*/
public function __construct()
{
$this->middleware('guest');
}
/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function showLinkRequestForm()
{
return $this->view('auth.passwords.email');

View File

@ -2,13 +2,12 @@
namespace App\Http\Controllers\Auth;
use Illuminate\Http\Request;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
use App\Http\Controllers\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 extends Controller
{
@ -16,11 +15,17 @@ class LoginController extends Controller
protected $redirectTo = '/dashboard';
/**
* LoginController constructor.
*/
public function __construct()
{
$this->middleware('guest', ['except' => 'logout']);
}
/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function showLoginForm()
{
return $this->view('auth/login');

View File

@ -2,22 +2,19 @@
namespace App\Http\Controllers\Auth;
use Log;
use Validator;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Foundation\Auth\RegistersUsers;
use Jackiedo\Timezonelist\Facades\Timezonelist;
use App\Models\User;
use App\Facades\Utils;
use App\Models\Airport;
use App\Models\Airline;
use App\Services\UserService;
use App\Models\Enums\UserState;
use App\Http\Controllers\Controller;
use App\Models\Enums\UserState;
use App\Models\User;
use App\Repositories\AirlineRepository;
use App\Repositories\AirportRepository;
use App\Services\UserService;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Jackiedo\Timezonelist\Facades\Timezonelist;
use Log;
use Validator;
class RegisterController extends Controller
{
@ -25,7 +22,6 @@ class RegisterController extends Controller
/**
* Where to redirect users after login / registration.
*
* @var string
*/
protected $redirectTo = '/';
@ -34,7 +30,12 @@ class RegisterController extends Controller
$airportRepo,
$userService;
/**
* RegisterController constructor.
* @param AirlineRepository $airlineRepo
* @param AirportRepository $airportRepo
* @param UserService $userService
*/
public function __construct(
AirlineRepository $airlineRepo,
AirportRepository $airportRepo,
@ -46,6 +47,9 @@ class RegisterController extends Controller
$this->middleware('guest');
}
/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function showRegistrationForm()
{
$airports = $this->airportRepo->selectBoxList(false, true);
@ -60,7 +64,6 @@ class RegisterController extends Controller
/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/
@ -77,7 +80,6 @@ class RegisterController extends Controller
/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
* @throws \RuntimeException

View File

@ -2,9 +2,9 @@
namespace App\Http\Controllers\Auth;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;
use Illuminate\Http\Request;
class ResetPasswordController extends Controller
{
@ -12,6 +12,11 @@ class ResetPasswordController extends Controller
use ResetsPasswords;
/**
* @param Request $request
* @param null $token
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function showResetForm(Request $request, $token = null)
{
return $this->view('auth.passwords.reset',
@ -21,7 +26,6 @@ class ResetPasswordController extends Controller
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()

View File

@ -2,10 +2,10 @@
namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;
class Controller extends BaseController
{

View File

@ -2,16 +2,20 @@
namespace App\Http\Controllers\Frontend;
use App\Http\Controllers\Controller;
use App\Repositories\AcarsRepository;
use App\Services\GeoService;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class AcarsController extends Controller
{
private $acarsRepo, $geoSvc;
/**
* AcarsController constructor.
* @param AcarsRepository $acarsRepo
* @param GeoService $geoSvc
*/
public function __construct(
AcarsRepository $acarsRepo,
GeoService $geoSvc
@ -21,7 +25,8 @@ class AcarsController extends Controller
}
/**
*
* @param Request $request
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function index(Request $request)
{

View File

@ -2,17 +2,20 @@
namespace App\Http\Controllers\Frontend;
use Log;
use Illuminate\Support\Facades\Auth;
use App\Http\Controllers\Controller;
use App\Repositories\PirepRepository;
use App\Repositories\UserRepository;
use Illuminate\Support\Facades\Auth;
class DashboardController extends Controller
{
private $pirepRepo, $userRepo;
/**
* DashboardController constructor.
* @param PirepRepository $pirepRepo
* @param UserRepository $userRepo
*/
public function __construct(
PirepRepository $pirepRepo,
UserRepository $userRepo

View File

@ -2,19 +2,16 @@
namespace App\Http\Controllers\Frontend;
use App\Repositories\AirlineRepository;
use App\Repositories\AirportRepository;
use App\Services\GeoService;
use Log;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use App\Http\Controllers\Controller;
use App\Models\UserBid;
use App\Repositories\FlightRepository;
use App\Repositories\AirlineRepository;
use App\Repositories\AirportRepository;
use App\Repositories\Criteria\WhereCriteria;
use App\Repositories\FlightRepository;
use App\Services\GeoService;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Log;
use Mockery\Exception;
use Prettus\Repository\Exceptions\RepositoryException;
@ -25,6 +22,13 @@ class FlightController extends Controller
$flightRepo,
$geoSvc;
/**
* FlightController constructor.
* @param AirlineRepository $airlineRepo
* @param AirportRepository $airportRepo
* @param FlightRepository $flightRepo
* @param GeoService $geoSvc
*/
public function __construct(
AirlineRepository $airlineRepo,
AirportRepository $airportRepo,
@ -37,6 +41,10 @@ class FlightController extends Controller
$this->geoSvc = $geoSvc;
}
/**
* @param Request $request
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function index(Request $request)
{
$where = ['active' => true];
@ -86,6 +94,11 @@ class FlightController extends Controller
]);
}
/**
* @param Request $request
* @return \Illuminate\Http\JsonResponse
* @throws \Exception
*/
public function save(Request $request)
{
$user_id = Auth::id();
@ -118,6 +131,8 @@ class FlightController extends Controller
/**
* Show the flight information page
* @param $id
* @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View
*/
public function show($id)
{

View File

@ -2,9 +2,9 @@
namespace App\Http\Controllers\Frontend;
use Illuminate\Database\QueryException;
use App\Http\Controllers\Controller;
use App\Models\User;
use Illuminate\Database\QueryException;
class HomeController extends Controller
{

View File

@ -2,28 +2,24 @@
namespace App\Http\Controllers\Frontend;
use Log;
use App\Facades\Utils;
use App\Http\Controllers\Controller;
use App\Http\Requests\CreatePirepRequest;
use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use App\Models\Enums\PirepSource;
use App\Models\Enums\PirepState;
use App\Models\Pirep;
use App\Models\PirepField;
use App\Repositories\AirlineRepository;
use App\Repositories\AirportRepository;
use App\Repositories\Criteria\WhereCriteria;
use App\Repositories\PirepFieldRepository;
use App\Repositories\PirepRepository;
use App\Repositories\SubfleetRepository;
use App\Services\GeoService;
use App\Services\PIREPService;
use App\Services\UserService;
use App\Repositories\Criteria\WhereCriteria;
use App\Http\Controllers\Controller;
use App\Repositories\AirlineRepository;
use App\Repositories\AirportRepository;
use App\Repositories\PirepRepository;
use App\Repositories\PirepFieldRepository;
use App\Repositories\SubfleetRepository;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Log;
class PirepController extends Controller
@ -37,6 +33,17 @@ class PirepController extends Controller
$subfleetRepo,
$userSvc;
/**
* PirepController constructor.
* @param AirlineRepository $airlineRepo
* @param PirepRepository $pirepRepo
* @param AirportRepository $airportRepo
* @param PirepFieldRepository $pirepFieldRepo
* @param GeoService $geoSvc
* @param SubfleetRepository $subfleetRepo
* @param PIREPService $pirepSvc
* @param UserService $userSvc
*/
public function __construct(
AirlineRepository $airlineRepo,
PirepRepository $pirepRepo,
@ -119,9 +126,9 @@ class PirepController extends Controller
}
/**
*
* @param CreatePirepRequest $request
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
* @throws \Exception
*/
public function store(CreatePirepRequest $request)
{
@ -163,6 +170,10 @@ class PirepController extends Controller
return redirect(route('frontend.pireps.show', ['id' => $pirep->id]));
}
/**
* @param $id
* @return mixed
*/
public function show($id)
{
$pirep = $this->pirepRepo->find($id);

View File

@ -2,22 +2,20 @@
namespace App\Http\Controllers\Frontend;
use App\Support\Countries;
use Log;
use Hash;
use Flash;
use Validator;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Jackiedo\Timezonelist\Facades\Timezonelist;
use App\Http\Controllers\Controller;
use App\Models\User;
use App\Facades\Utils;
use App\Http\Controllers\Controller;
use App\Models\User;
use App\Repositories\AirlineRepository;
use App\Repositories\AirportRepository;
use App\Repositories\UserRepository;
use App\Support\Countries;
use Flash;
use Hash;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Jackiedo\Timezonelist\Facades\Timezonelist;
use Log;
use Validator;
class ProfileController extends Controller
{
@ -25,6 +23,12 @@ class ProfileController extends Controller
$airportRepo,
$userRepo;
/**
* ProfileController constructor.
* @param AirlineRepository $airlineRepo
* @param AirportRepository $airportRepo
* @param UserRepository $userRepo
*/
public function __construct(
AirlineRepository $airlineRepo,
AirportRepository $airportRepo,
@ -35,6 +39,9 @@ class ProfileController extends Controller
$this->userRepo = $userRepo;
}
/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function index()
{
$airports = $this->airportRepo->all();
@ -45,6 +52,10 @@ class ProfileController extends Controller
]);
}
/**
* @param $id
* @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View
*/
public function show($id)
{
$user = User::where('id', $id)->first();
@ -63,6 +74,8 @@ class ProfileController extends Controller
/**
* Show the edit for form the user's profile
* @param Request $request
* @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View
*/
public function edit(Request $request)
{
@ -84,6 +97,11 @@ class ProfileController extends Controller
]);
}
/**
* @param Request $request
* @return $this
* @throws \Prettus\Validator\Exceptions\ValidatorException
*/
public function update(Request $request)
{
$id = Auth::user()->id;
@ -120,6 +138,8 @@ class ProfileController extends Controller
/**
* Regenerate the user's API key
* @param Request $request
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
*/
public function regen_apikey(Request $request)
{

View File

@ -2,15 +2,18 @@
namespace App\Http\Controllers\Frontend;
use App\Http\Controllers\Controller;
use App\Repositories\UserRepository;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class UserController extends Controller
{
private $userRepo;
/**
* UserController constructor.
* @param UserRepository $userRepo
*/
public function __construct(
UserRepository $userRepo
) {
@ -18,7 +21,8 @@ class UserController extends Controller
}
/**
*
* @param Request $request
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function index(Request $request)
{

View File

@ -6,10 +6,9 @@
namespace App\Http\Middleware;
use App\Models\Enums\UserState;
use Auth;
use Log;
use Closure;
use App\Models\User;
use Auth;
use Closure;
class ApiAuth
{

View File

@ -8,10 +8,8 @@ class VerifyCsrfToken extends BaseVerifier
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
//
];
}

View File

@ -2,8 +2,8 @@
namespace App\Http\Requests\Acars;
use Auth;
use App\Models\Pirep;
use Auth;
use Illuminate\Foundation\Http\FormRequest;
/**

View File

@ -2,8 +2,8 @@
namespace App\Http\Requests\Acars;
use Auth;
use App\Models\Pirep;
use Auth;
use Illuminate\Foundation\Http\FormRequest;
/**

View File

@ -2,8 +2,8 @@
namespace App\Http\Requests\Acars;
use Auth;
use App\Models\Pirep;
use Auth;
use Illuminate\Foundation\Http\FormRequest;
/**

View File

@ -2,8 +2,8 @@
namespace App\Http\Requests\Acars;
use Auth;
use App\Models\Pirep;
use Auth;
use Illuminate\Foundation\Http\FormRequest;
/**

View File

@ -2,8 +2,8 @@
namespace App\Http\Requests\Acars;
use Auth;
use App\Models\Pirep;
use Auth;
use Illuminate\Foundation\Http\FormRequest;
/**

View File

@ -2,8 +2,8 @@
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use App\Models\Aircraft;
use Illuminate\Foundation\Http\FormRequest;
class CreateAircraftRequest extends FormRequest
{

View File

@ -2,8 +2,8 @@
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use App\Models\Airline;
use Illuminate\Foundation\Http\FormRequest;
class CreateAirlineRequest extends FormRequest
{

View File

@ -2,8 +2,8 @@
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use App\Models\Fare;
use Illuminate\Foundation\Http\FormRequest;
class CreateFareRequest extends FormRequest
{

View File

@ -2,11 +2,10 @@
namespace App\Http\Requests;
use Log;
use Illuminate\Foundation\Http\FormRequest;
use App\Models\Pirep;
use App\Repositories\PirepFieldRepository;
use Illuminate\Foundation\Http\FormRequest;
use Log;
class CreatePirepRequest extends FormRequest
{

View File

@ -2,8 +2,8 @@
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use App\Models\Airline;
use Illuminate\Foundation\Http\FormRequest;
class UpdateAirlineRequest extends FormRequest
{

View File

@ -2,8 +2,8 @@
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use App\Models\Fare;
use Illuminate\Foundation\Http\FormRequest;
class UpdateFareRequest extends FormRequest
{

View File

@ -5,7 +5,6 @@ namespace App\Http\Requests;
use App\Models\PirepField;
use Illuminate\Foundation\Http\FormRequest;
class UpdatePirepFieldRequest extends FormRequest
{

View File

@ -5,7 +5,6 @@ namespace App\Http\Requests;
use App\Models\Pirep;
use Illuminate\Foundation\Http\FormRequest;
class UpdatePirepRequest extends FormRequest
{

View File

@ -2,12 +2,11 @@
namespace App\Listeners;
use Log;
use Illuminate\Support\Facades\Mail;
use App\Events\UserRegistered;
use App\Events\UserStateChanged;
use App\Models\Enums\UserState;
use Illuminate\Support\Facades\Mail;
use Log;
/**
* Handle sending emails on different events

View File

@ -3,8 +3,8 @@
namespace App\Mail;
use App\Models\User;
use Illuminate\Mail\Mailable;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class NewLoginDetails extends Mailable

View File

@ -3,8 +3,8 @@
namespace App\Mail;
use App\Models\User;
use Illuminate\Mail\Mailable;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class UserPending extends Mailable

View File

@ -1,14 +1,7 @@
<?php
/**
* Created by IntelliJ IDEA.
* User: nshahzad
* Date: 12/19/17
* Time: 8:13 PM
*/
namespace App\Models\Enums;
class PirepSource extends EnumBase
{
public const MANUAL = 0;

View File

@ -2,7 +2,6 @@
namespace App\Models\Enums;
class PirepState extends EnumBase {
public const REJECTED = -1;

View File

@ -5,7 +5,6 @@
namespace App\Models\Enums;
/**
* Tied to the ACARS statuses/states
* Class PirepStatus

View File

@ -4,7 +4,6 @@ namespace App\Models;
/**
* Class Fare
*
* @package App\Models
*/
class Fare extends BaseModel

View File

@ -2,13 +2,12 @@
namespace App\Models;
use App\Models\Traits\HashId;
use App\Support\Units\Distance;
use App\Support\Units\Time;
use PhpUnitsOfMeasure\Exception\NonNumericValue;
use PhpUnitsOfMeasure\Exception\NonStringUnitName;
use App\Models\Traits\HashId;
class Flight extends BaseModel
{
use HashId;

View File

@ -2,10 +2,10 @@
namespace App\Models;
use \GeoJson\Geometry\Point;
use \GeoJson\Geometry\LineString;
use \GeoJson\Feature\Feature;
use \GeoJson\Feature\FeatureCollection;
use GeoJson\Feature\Feature;
use GeoJson\Feature\FeatureCollection;
use GeoJson\Geometry\LineString;
use GeoJson\Geometry\Point;
/**
* Return different points/features in GeoJSON format

View File

@ -5,8 +5,8 @@
namespace App\Models\Migrations;
use DB;
use App\Models\Setting;
use DB;
use Illuminate\Database\Migrations\Migration as MigrationBase;
class Migration extends MigrationBase

View File

@ -6,7 +6,6 @@ use App\Models\Enums\AcarsType;
use App\Models\Enums\PirepState;
use App\Models\Traits\HashId;
use App\Support\Units\Distance;
use App\Support\Units\Fuel;
use PhpUnitsOfMeasure\Exception\NonNumericValue;
use PhpUnitsOfMeasure\Exception\NonStringUnitName;

View File

@ -4,7 +4,6 @@ namespace App\Models\Traits;
use Hashids\Hashids;
trait HashId
{
/**

View File

@ -3,11 +3,9 @@
namespace App\Models;
use App\Models\Enums\PirepState;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laratrust\Traits\LaratrustUserTrait;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Contracts\Auth\CanResetPassword;
/**
* @property integer $id

View File

@ -2,10 +2,9 @@
namespace App\Providers;
use Log;
use App\Repositories\SettingRepository;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;
use App\Repositories\SettingRepository;
class AppServiceProvider extends ServiceProvider
{

View File

@ -2,7 +2,6 @@
namespace App\Providers;
use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ServiceProvider

View File

@ -2,8 +2,8 @@
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast;
use Illuminate\Support\ServiceProvider;
class BroadcastServiceProvider extends ServiceProvider
{

View File

@ -2,8 +2,8 @@
namespace App\Providers;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use App\Listeners\NotificationEventListener;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider

View File

@ -2,8 +2,8 @@
namespace App\Providers;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Route;
class RouteServiceProvider extends ServiceProvider
{

Some files were not shown because too many files have changed in this diff Show More