Fix tests and docs/better checks #130
This commit is contained in:
@@ -5,6 +5,17 @@ namespace App\Models;
|
||||
use App\Models\Enums\AircraftStatus;
|
||||
use App\Support\ICAO;
|
||||
|
||||
/**
|
||||
* @property mixed subfleet_id
|
||||
* @property string name
|
||||
* @property string icao
|
||||
* @property string registration
|
||||
* @property string hex_code
|
||||
* @property Airport airport
|
||||
* @property Subfleet subfleet
|
||||
* @property int status
|
||||
* @property int state
|
||||
*/
|
||||
class Aircraft extends BaseModel
|
||||
{
|
||||
public $table = 'aircraft';
|
||||
|
||||
@@ -6,6 +6,7 @@ use App\Models\Traits\JournalTrait;
|
||||
|
||||
/**
|
||||
* Class Airline
|
||||
* @property Journal journal
|
||||
* @package App\Models
|
||||
*/
|
||||
class Airline extends BaseModel
|
||||
|
||||
@@ -6,6 +6,7 @@ use Illuminate\Notifications\Notifiable;
|
||||
|
||||
/**
|
||||
* Class Airport
|
||||
* @property float ground_handling_cost
|
||||
* @package App\Models
|
||||
*/
|
||||
class Airport extends BaseModel
|
||||
|
||||
@@ -4,6 +4,8 @@ namespace App\Models;
|
||||
|
||||
/**
|
||||
* Class Expense
|
||||
* @property float amount
|
||||
* @property string name
|
||||
* @package App\Models
|
||||
*/
|
||||
class Expense extends BaseModel
|
||||
|
||||
@@ -4,6 +4,10 @@ namespace App\Models;
|
||||
|
||||
/**
|
||||
* Class Fare
|
||||
* @property integer capacity
|
||||
* @property float cost
|
||||
* @property float price
|
||||
* @property mixed code
|
||||
* @package App\Models
|
||||
*/
|
||||
class Fare extends BaseModel
|
||||
|
||||
@@ -13,13 +13,16 @@ use PhpUnitsOfMeasure\Exception\NonStringUnitName;
|
||||
/**
|
||||
* Class Pirep
|
||||
*
|
||||
* @property string flight_number
|
||||
* @property string route_code
|
||||
* @property string route_leg
|
||||
* @property integer airline_id
|
||||
* @property Aircraft aircraft
|
||||
* @property Airline airline
|
||||
* @property Airport arr_airport
|
||||
* @property Airport dep_airport
|
||||
* @property mixed flight_number
|
||||
* @property mixed route_code
|
||||
* @property mixed route_leg
|
||||
* @property integer flight_time In minutes
|
||||
* @property User user
|
||||
* @package App\Models
|
||||
*/
|
||||
class Pirep extends BaseModel
|
||||
@@ -221,7 +224,7 @@ class Pirep extends BaseModel
|
||||
* Do some cleanup on the route
|
||||
* @param $route
|
||||
*/
|
||||
public function setRouteAttribute($route)
|
||||
public function setRouteAttribute($route): void
|
||||
{
|
||||
$route = strtoupper(trim($route));
|
||||
$this->attributes['route'] = $route;
|
||||
@@ -231,7 +234,7 @@ class Pirep extends BaseModel
|
||||
* Check if this PIREP is allowed to be updated
|
||||
* @return bool
|
||||
*/
|
||||
public function allowedUpdates()
|
||||
public function allowedUpdates(): bool
|
||||
{
|
||||
if($this->state === PirepState::CANCELLED) {
|
||||
return false;
|
||||
@@ -321,7 +324,9 @@ class Pirep extends BaseModel
|
||||
public function transactions()
|
||||
{
|
||||
return $this->hasMany(JournalTransaction::class, 'ref_class_id')
|
||||
->where('ref_class', __CLASS__);
|
||||
->where('ref_class', __CLASS__)
|
||||
->orderBy('credit', 'desc')
|
||||
->orderBy('debit', 'desc');
|
||||
}
|
||||
|
||||
public function user()
|
||||
|
||||
@@ -4,6 +4,9 @@ namespace App\Models;
|
||||
|
||||
/**
|
||||
* Class Rank
|
||||
* @property int hours
|
||||
* @property float manual_base_pay_rate
|
||||
* @property float acars_base_pay_rate
|
||||
* @package App\Models
|
||||
*/
|
||||
class Rank extends BaseModel
|
||||
|
||||
@@ -14,11 +14,13 @@ use Laratrust\Traits\LaratrustUserTrait;
|
||||
* @property string $email
|
||||
* @property string $password
|
||||
* @property string $api_key
|
||||
* @property string $flights
|
||||
* @property Flight[] $flights
|
||||
* @property string $flight_time
|
||||
* @property string $remember_token
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @property Rank rank
|
||||
* @property Journal journal
|
||||
* @mixin \Illuminate\Notifications\Notifiable
|
||||
* @mixin \Laratrust\Traits\LaratrustUserTrait
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user