diff --git a/app/Console/Commands/CreateConfigs.php b/app/Console/Commands/CreateConfigs.php index 096236152..54b5bc25e 100644 --- a/app/Console/Commands/CreateConfigs.php +++ b/app/Console/Commands/CreateConfigs.php @@ -5,8 +5,6 @@ use App\Contracts\Command; use App\Services\Installer\ConfigService; use App\Services\Installer\MigrationService; -use App\Services\Installer\SeederService; -use DatabaseSeeder; use Illuminate\Support\Facades\App; /** diff --git a/app/Contracts/Command.php b/app/Contracts/Command.php index 7bb2420e5..2e0a2d9fc 100644 --- a/app/Contracts/Command.php +++ b/app/Contracts/Command.php @@ -4,10 +4,6 @@ use Illuminate\Log\Logger; use Illuminate\Support\Facades\Log; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Process\Process; - -use function is_array; /** * Class BaseCommand diff --git a/app/Contracts/Repository.php b/app/Contracts/Repository.php index d874e51fb..c2ce49498 100644 --- a/app/Contracts/Repository.php +++ b/app/Contracts/Repository.php @@ -94,10 +94,10 @@ public function whereOrder($where, $sort_by, $order_by = 'asc') /** * Find records where values don't match a list but sort the rest * - * @param string $col - * @param array $values + * @param string $col + * @param array $values * @param string|array $sort_by - * @param string $order_by + * @param string $order_by * * @return $this */ diff --git a/app/Exceptions/AssetNotFound.php b/app/Exceptions/AssetNotFound.php index 58d1f321c..1f0a6303d 100644 --- a/app/Exceptions/AssetNotFound.php +++ b/app/Exceptions/AssetNotFound.php @@ -6,7 +6,8 @@ class AssetNotFound extends AbstractHttpException { - public function __construct(Exception $exception) { + public function __construct(Exception $exception) + { parent::__construct( 404, $exception->getMessage() diff --git a/app/Http/Controllers/Admin/ExpenseController.php b/app/Http/Controllers/Admin/ExpenseController.php index b48bb6e1b..76f46fbdc 100644 --- a/app/Http/Controllers/Admin/ExpenseController.php +++ b/app/Http/Controllers/Admin/ExpenseController.php @@ -11,7 +11,6 @@ use App\Repositories\AirlineRepository; use App\Repositories\ExpenseRepository; use App\Services\ExportService; -use App\Services\ImportService; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\View\View; diff --git a/app/Http/Controllers/Admin/FlightController.php b/app/Http/Controllers/Admin/FlightController.php index c190691d5..8bd474e9e 100644 --- a/app/Http/Controllers/Admin/FlightController.php +++ b/app/Http/Controllers/Admin/FlightController.php @@ -12,7 +12,6 @@ use App\Models\FlightField; use App\Models\FlightFieldValue; use App\Repositories\AirlineRepository; -use App\Repositories\AirportRepository; use App\Repositories\FareRepository; use App\Repositories\FlightFieldRepository; use App\Repositories\FlightRepository; @@ -21,7 +20,6 @@ use App\Services\FareService; use App\Services\FleetService; use App\Services\FlightService; -use App\Services\ImportService; use App\Support\Units\Time; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index 6b8dbe9e8..cc94125a0 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -10,7 +10,6 @@ use App\Models\User; use App\Models\UserAward; use App\Repositories\AirlineRepository; -use App\Repositories\AirportRepository; use App\Repositories\PirepRepository; use App\Repositories\RoleRepository; use App\Repositories\TypeRatingRepository; diff --git a/app/Http/Controllers/Api/AcarsController.php b/app/Http/Controllers/Api/AcarsController.php index 21d20eff6..925dac6a7 100644 --- a/app/Http/Controllers/Api/AcarsController.php +++ b/app/Http/Controllers/Api/AcarsController.php @@ -63,7 +63,7 @@ protected function checkCancelled(Pirep $pirep): void public function live_flights() { $pireps = $this->acarsRepo->getPositions(setting('acars.live_time'))->filter( - fn(Pirep $pirep) => $pirep->position !== null + fn (Pirep $pirep) => $pirep->position !== null ); return PirepResource::collection($pireps); diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 6323bfb57..1c366a418 100755 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -9,7 +9,6 @@ use App\Models\UserField; use App\Models\UserFieldValue; use App\Repositories\AirlineRepository; -use App\Repositories\AirportRepository; use App\Services\UserService; use App\Support\Countries; use App\Support\HttpClient; @@ -160,6 +159,7 @@ function ($attribute, $value, $fail) { * Get a validator for an incoming registration request. * * @param Request $request + * * @return User */ protected function create(Request $request): User diff --git a/app/Http/Controllers/Frontend/HomeController.php b/app/Http/Controllers/Frontend/HomeController.php index d5a05ae1b..3fd8cd2ae 100644 --- a/app/Http/Controllers/Frontend/HomeController.php +++ b/app/Http/Controllers/Frontend/HomeController.php @@ -6,7 +6,6 @@ use App\Models\Enums\UserState; use App\Models\User; use Illuminate\Database\Eloquent\Collection; -use Illuminate\Database\QueryException; use Illuminate\Support\Facades\Log; use Illuminate\View\View; diff --git a/app/Http/Controllers/Frontend/ProfileController.php b/app/Http/Controllers/Frontend/ProfileController.php index 67aa1baf9..e41fae4cd 100644 --- a/app/Http/Controllers/Frontend/ProfileController.php +++ b/app/Http/Controllers/Frontend/ProfileController.php @@ -8,7 +8,6 @@ use App\Models\UserField; use App\Models\UserFieldValue; use App\Repositories\AirlineRepository; -use App\Repositories\AirportRepository; use App\Repositories\UserRepository; use App\Support\Countries; use App\Support\Timezonelist; diff --git a/app/Models/Expense.php b/app/Models/Expense.php index 1b524d27e..a2af1422a 100644 --- a/app/Models/Expense.php +++ b/app/Models/Expense.php @@ -10,15 +10,15 @@ use Illuminate\Database\Eloquent\Relations\MorphTo; /** - * @property int $airline_id - * @property float $amount - * @property string $name - * @property string $type + * @property int $airline_id + * @property float $amount + * @property string $name + * @property string $type * @property string[] $flight_type - * @property string $ref_model - * @property string $ref_model_id - * @property bool $charge_to_user - * @property Airline $airline + * @property string $ref_model + * @property string $ref_model_id + * @property bool $charge_to_user + * @property Airline $airline * * @mixin \Illuminate\Database\Eloquent\Builder */ diff --git a/app/Models/Fare.php b/app/Models/Fare.php index 9249b450c..814c75c89 100644 --- a/app/Models/Fare.php +++ b/app/Models/Fare.php @@ -3,7 +3,6 @@ namespace App\Models; use App\Contracts\Model; -use App\Models\Enums\FareType; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\SoftDeletes; diff --git a/app/Models/Flight.php b/app/Models/Flight.php index 1e55b0375..52d13d83a 100644 --- a/app/Models/Flight.php +++ b/app/Models/Flight.php @@ -21,43 +21,43 @@ use Kyslik\ColumnSortable\Sortable; /** - * @property string $id - * @property mixed $ident - * @property mixed $atc - * @property Airline $airline - * @property int $airline_id - * @property mixed $flight_number - * @property mixed $callsign - * @property mixed $route_code - * @property int $route_leg - * @property bool $has_bid + * @property string $id + * @property mixed $ident + * @property mixed $atc + * @property Airline $airline + * @property int $airline_id + * @property mixed $flight_number + * @property mixed $callsign + * @property mixed $route_code + * @property int $route_leg + * @property bool $has_bid * @property Collection $field_values - * @property Collection $fares - * @property Collection $subfleets - * @property int $days - * @property Distance $distance - * @property Distance $planned_distance - * @property int $flight_time - * @property string $route - * @property string $dpt_time - * @property string $arr_time - * @property string $flight_type - * @property string $notes - * @property int $level - * @property float $load_factor - * @property float $load_factor_variance - * @property float $pilot_pay - * @property Airport $dpt_airport - * @property Airport $arr_airport - * @property ?Airport $alt_airport - * @property string $dpt_airport_id - * @property string $arr_airport_id - * @property ?string $alt_airport_id - * @property int $event_id - * @property int $user_id - * @property int $active - * @property Carbon $start_date - * @property Carbon $end_date + * @property Collection $fares + * @property Collection $subfleets + * @property int $days + * @property Distance $distance + * @property Distance $planned_distance + * @property int $flight_time + * @property string $route + * @property string $dpt_time + * @property string $arr_time + * @property string $flight_type + * @property string $notes + * @property int $level + * @property float $load_factor + * @property float $load_factor_variance + * @property float $pilot_pay + * @property Airport $dpt_airport + * @property Airport $arr_airport + * @property ?Airport $alt_airport + * @property string $dpt_airport_id + * @property string $arr_airport_id + * @property ?string $alt_airport_id + * @property int $event_id + * @property int $user_id + * @property int $active + * @property Carbon $start_date + * @property Carbon $end_date */ class Flight extends Model { diff --git a/app/Models/Ledger.php b/app/Models/Ledger.php index b5ee18d63..0d4138db2 100644 --- a/app/Models/Ledger.php +++ b/app/Models/Ledger.php @@ -14,11 +14,11 @@ /** * Class Ledger * - * @property Money $balance - * @property string $currency - * @property Carbon $updated_at - * @property Carbon $post_date - * @property Carbon $created_at + * @property Money $balance + * @property string $currency + * @property Carbon $updated_at + * @property Carbon $post_date + * @property Carbon $created_at * @property Collection $journal_transctions */ class Ledger extends Model diff --git a/app/Models/Observers/JournalTransactionObserver.php b/app/Models/Observers/JournalTransactionObserver.php index 166235e8a..f3e63f77d 100644 --- a/app/Models/Observers/JournalTransactionObserver.php +++ b/app/Models/Observers/JournalTransactionObserver.php @@ -3,7 +3,6 @@ namespace App\Models\Observers; use App\Models\JournalTransaction; -use App\Support\Money; /** * Class JournalTransactionObserver diff --git a/app/Models/PirepFare.php b/app/Models/PirepFare.php index c8b736e04..395f88df0 100644 --- a/app/Models/PirepFare.php +++ b/app/Models/PirepFare.php @@ -3,7 +3,6 @@ namespace App\Models; use App\Contracts\Model; -use App\Models\Enums\FareType; use Illuminate\Database\Eloquent\Relations\BelongsTo; /** diff --git a/app/Models/Rank.php b/app/Models/Rank.php index 70af8b4d0..57a735ec0 100644 --- a/app/Models/Rank.php +++ b/app/Models/Rank.php @@ -12,14 +12,14 @@ use Kyslik\ColumnSortable\Sortable; /** - * @property string $name - * @property int $hours - * @property string $image_url - * @property float $manual_base_pay_rate - * @property float $acars_base_pay_rate - * @property bool $auto_promote - * @property bool $auto_approve_acars - * @property bool $auto_approve_manual + * @property string $name + * @property int $hours + * @property string $image_url + * @property float $manual_base_pay_rate + * @property float $acars_base_pay_rate + * @property bool $auto_promote + * @property bool $auto_approve_acars + * @property bool $auto_approve_manual * @property Collection $subfleets */ class Rank extends Model diff --git a/app/Models/Subfleet.php b/app/Models/Subfleet.php index 1fb4eac43..f2f85731f 100644 --- a/app/Models/Subfleet.php +++ b/app/Models/Subfleet.php @@ -17,20 +17,20 @@ use Kyslik\ColumnSortable\Sortable; /** - * @property int $id - * @property string $type - * @property string $simbrief_type - * @property string $name - * @property int $airline_id - * @property ?string $hub_id - * @property int $ground_handling_multiplier + * @property int $id + * @property string $type + * @property string $simbrief_type + * @property string $name + * @property int $airline_id + * @property ?string $hub_id + * @property int $ground_handling_multiplier * @property Collection $fares - * @property float $cost_block_hour - * @property float $cost_delay_minute - * @property Airline $airline - * @property ?Airport $home - * @property int $fuel_type - * @property Aircraft[] $aircraft + * @property float $cost_block_hour + * @property float $cost_delay_minute + * @property Airline $airline + * @property ?Airport $home + * @property int $fuel_type + * @property Aircraft[] $aircraft */ class Subfleet extends Model { diff --git a/app/Models/User.php b/app/Models/User.php index 01e67d46a..28757b45a 100755 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -20,48 +20,48 @@ use Staudenmeir\EloquentHasManyDeep\HasRelationships; /** - * @property int $id - * @property int $pilot_id - * @property int $airline_id - * @property string $callsign - * @property string $name - * @property string $name_private Only first name, rest are initials - * @property string $email - * @property string $password - * @property string $api_key - * @property mixed $timezone - * @property string $ident - * @property string $atc - * @property ?string $curr_airport_id - * @property ?string $home_airport_id - * @property ?File $avatar - * @property Airline $airline - * @property int $flights - * @property int $flight_time - * @property int $transfer_time - * @property string $remember_token - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property ?Rank $rank - * @property ?Journal $journal - * @property ?int $rank_id - * @property string $discord_id - * @property int $state - * @property string $last_ip - * @property \Carbon\Carbon $lastlogin_at - * @property bool $opt_in - * @property Collection $pireps - * @property string $last_pirep_id - * @property Pirep $last_pirep - * @property UserFieldValue[] $fields - * @property UserOAuthToken[] $oauth_tokens - * @property Collection $roles - * @property Collection $subfleets - * @property Collection $typeratings - * @property ?Airport $home_airport - * @property ?Airport $current_airport - * @property ?Airport $location - * @property Bid[] $bids + * @property int $id + * @property int $pilot_id + * @property int $airline_id + * @property string $callsign + * @property string $name + * @property string $name_private Only first name, rest are initials + * @property string $email + * @property string $password + * @property string $api_key + * @property mixed $timezone + * @property string $ident + * @property string $atc + * @property ?string $curr_airport_id + * @property ?string $home_airport_id + * @property ?File $avatar + * @property Airline $airline + * @property int $flights + * @property int $flight_time + * @property int $transfer_time + * @property string $remember_token + * @property \Carbon\Carbon $created_at + * @property \Carbon\Carbon $updated_at + * @property ?Rank $rank + * @property ?Journal $journal + * @property ?int $rank_id + * @property string $discord_id + * @property int $state + * @property string $last_ip + * @property \Carbon\Carbon $lastlogin_at + * @property bool $opt_in + * @property Collection $pireps + * @property string $last_pirep_id + * @property Pirep $last_pirep + * @property UserFieldValue[] $fields + * @property UserOAuthToken[] $oauth_tokens + * @property Collection $roles + * @property Collection $subfleets + * @property Collection $typeratings + * @property ?Airport $home_airport + * @property ?Airport $current_airport + * @property ?Airport $location + * @property Bid[] $bids * * @mixin \Illuminate\Database\Eloquent\Builder */ diff --git a/app/Notifications/Messages/Broadcast/AwardAwarded.php b/app/Notifications/Messages/Broadcast/AwardAwarded.php index ce9a4bfba..a811729ab 100644 --- a/app/Notifications/Messages/Broadcast/AwardAwarded.php +++ b/app/Notifications/Messages/Broadcast/AwardAwarded.php @@ -7,7 +7,6 @@ use App\Models\User; use App\Models\UserAward; use App\Notifications\Channels\Discord\DiscordMessage; -use Illuminate\Contracts\Queue\ShouldQueue; class AwardAwarded extends Notification { diff --git a/app/Notifications/NotificationEventsHandler.php b/app/Notifications/NotificationEventsHandler.php index dc052e2a3..632cb2c30 100644 --- a/app/Notifications/NotificationEventsHandler.php +++ b/app/Notifications/NotificationEventsHandler.php @@ -28,7 +28,6 @@ */ class NotificationEventsHandler extends Listener { - public static $callbacks = [ AwardAwarded::class => 'onAwardAwarded', NewsAdded::class => 'onNewsAdded', diff --git a/app/Repositories/ExpenseRepository.php b/app/Repositories/ExpenseRepository.php index f7132107e..b44865763 100644 --- a/app/Repositories/ExpenseRepository.php +++ b/app/Repositories/ExpenseRepository.php @@ -3,7 +3,6 @@ namespace App\Repositories; use App\Contracts\Repository; -use App\Models\Enums\ExpenseType; use App\Models\Expense; use Illuminate\Support\Collection; use Prettus\Repository\Contracts\CacheableInterface; @@ -22,10 +21,10 @@ public function model() * Get all of the expenses for a given type, and also * include expenses for a given airline ID * - * @param int $type - * @param ?int $airline_id - * @param class-string|object|null $ref_model - * @param string|int $ref_model_id + * @param int $type + * @param ?int $airline_id + * @param class-string|object|null $ref_model + * @param string|int $ref_model_id * * @return Collection */ diff --git a/app/Services/FlightService.php b/app/Services/FlightService.php index 4879fc63b..8383ba1c5 100644 --- a/app/Services/FlightService.php +++ b/app/Services/FlightService.php @@ -27,7 +27,7 @@ class FlightService extends Service * @param FlightRepository $flightRepo * @param NavdataRepository $navDataRepo * @param PirepRepository $pirepRepo - * @param UserService $userSvc + * @param UserService $userSvc */ public function __construct( private readonly AirportService $airportSvc, diff --git a/app/Services/ImportService.php b/app/Services/ImportService.php index 6590d8f81..677988bbf 100644 --- a/app/Services/ImportService.php +++ b/app/Services/ImportService.php @@ -9,7 +9,6 @@ use App\Models\Fare; use App\Models\Flight; use App\Models\FlightFieldValue; -use App\Repositories\FlightRepository; use App\Services\ImportExport\AircraftImporter; use App\Services\ImportExport\AirportImporter; use App\Services\ImportExport\ExpenseImporter; diff --git a/app/Services/PirepService.php b/app/Services/PirepService.php index 17e5da567..857f1803f 100644 --- a/app/Services/PirepService.php +++ b/app/Services/PirepService.php @@ -199,7 +199,7 @@ public function prefile(User $user, array $attrs, array $fields = [], array $far /** * Create a new PIREP with some given fields * - * @param Pirep $pirep + * @param Pirep $pirep * @param PirepFieldValue[] $fields * * @return Pirep diff --git a/app/Services/RoleService.php b/app/Services/RoleService.php index 3f041fca9..bdca4269e 100644 --- a/app/Services/RoleService.php +++ b/app/Services/RoleService.php @@ -4,7 +4,6 @@ use App\Contracts\Service; use App\Models\Role; -use App\Repositories\RoleRepository; class RoleService extends Service { diff --git a/app/Support/Modules/DatabaseActivator.php b/app/Support/Modules/DatabaseActivator.php index 229b74f48..4324a33d1 100644 --- a/app/Support/Modules/DatabaseActivator.php +++ b/app/Support/Modules/DatabaseActivator.php @@ -4,7 +4,6 @@ use Exception; use Illuminate\Config\Repository as Config; -use Illuminate\Container\Container; use Illuminate\Database\Eloquent\Collection; use Illuminate\Filesystem\Filesystem; use Illuminate\Support\Facades\Cache; @@ -19,13 +18,13 @@ class DatabaseActivator implements ActivatorInterface * * @var Config * - private $config;*/ + * private $config;*/ /** * @var Filesystem * - private $files; - */ + * private $files; + */ /** * The module path. diff --git a/app/Support/Units/Altitude.php b/app/Support/Units/Altitude.php index 52b939bad..e81b84d63 100644 --- a/app/Support/Units/Altitude.php +++ b/app/Support/Units/Altitude.php @@ -14,8 +14,8 @@ class Altitude extends Unit ]; /** - * @param float|self $value - * @param string $unit + * @param float|self $value + * @param string $unit * * @throws \PhpUnitsOfMeasure\Exception\NonNumericValue * @throws \PhpUnitsOfMeasure\Exception\NonStringUnitName diff --git a/app/Support/Units/Fuel.php b/app/Support/Units/Fuel.php index 8aea1fedd..0d729e278 100644 --- a/app/Support/Units/Fuel.php +++ b/app/Support/Units/Fuel.php @@ -13,8 +13,8 @@ class Fuel extends Unit ]; /** - * @param float|self $value - * @param string $unit + * @param float|self $value + * @param string $unit * * @throws \PhpUnitsOfMeasure\Exception\NonNumericValue * @throws \PhpUnitsOfMeasure\Exception\NonStringUnitName diff --git a/app/Support/Units/Mass.php b/app/Support/Units/Mass.php index 0897eec41..5e0f4ad22 100644 --- a/app/Support/Units/Mass.php +++ b/app/Support/Units/Mass.php @@ -13,8 +13,8 @@ class Mass extends Unit ]; /** - * @param float|self $value - * @param string $unit + * @param float|self $value + * @param string $unit * * @throws \PhpUnitsOfMeasure\Exception\NonNumericValue * @throws \PhpUnitsOfMeasure\Exception\NonStringUnitName diff --git a/app/Support/Units/Pressure.php b/app/Support/Units/Pressure.php index ba7412623..ef24d45d6 100644 --- a/app/Support/Units/Pressure.php +++ b/app/Support/Units/Pressure.php @@ -16,8 +16,8 @@ class Pressure extends Unit ]; /** - * @param float|self $value - * @param string $unit + * @param float|self $value + * @param string $unit * * @throws \PhpUnitsOfMeasure\Exception\NonNumericValue * @throws \PhpUnitsOfMeasure\Exception\NonStringUnitName diff --git a/app/Support/Units/Temperature.php b/app/Support/Units/Temperature.php index f2c6a51bf..e57b06ed6 100644 --- a/app/Support/Units/Temperature.php +++ b/app/Support/Units/Temperature.php @@ -16,8 +16,8 @@ class Temperature extends Unit ]; /** - * @param float|self $value - * @param string $unit + * @param float|self $value + * @param string $unit * * @throws \PhpUnitsOfMeasure\Exception\NonNumericValue * @throws \PhpUnitsOfMeasure\Exception\NonStringUnitName diff --git a/app/Support/Units/Velocity.php b/app/Support/Units/Velocity.php index 03bb0c36b..4fd0d6c89 100644 --- a/app/Support/Units/Velocity.php +++ b/app/Support/Units/Velocity.php @@ -16,8 +16,8 @@ class Velocity extends Unit ]; /** - * @param float|self $value - * @param string $unit + * @param float|self $value + * @param string $unit * * @throws \PhpUnitsOfMeasure\Exception\NonNumericValue * @throws \PhpUnitsOfMeasure\Exception\NonStringUnitName diff --git a/app/Support/Units/Volume.php b/app/Support/Units/Volume.php index ec09a5400..6483b1964 100644 --- a/app/Support/Units/Volume.php +++ b/app/Support/Units/Volume.php @@ -16,8 +16,8 @@ class Volume extends Unit ]; /** - * @param float|self $value - * @param string $unit + * @param float|self $value + * @param string $unit * * @throws \PhpUnitsOfMeasure\Exception\NonNumericValue * @throws \PhpUnitsOfMeasure\Exception\NonStringUnitName diff --git a/app/Utils/ImporterDB.php b/app/Utils/ImporterDB.php index 7b6b9995a..4aac59f15 100644 --- a/app/Utils/ImporterDB.php +++ b/app/Utils/ImporterDB.php @@ -211,10 +211,10 @@ public function readRows($table, $order_by = 'id', $start_offset = 0, $fields = } /** - * @param string $table - * @param int $limit Number of rows to read - * @param int $offset Where to start from - * @param $order_by + * @param string $table + * @param int $limit Number of rows to read + * @param int $offset Where to start from + * @param $order_by * @param string|array $fields * * @return false|\PDOStatement|void