some cleanup as-per phpstan
This commit is contained in:
@@ -24,6 +24,26 @@ class ImportExport
|
||||
*/
|
||||
public static $columns = [];
|
||||
|
||||
/**
|
||||
* @param mixed $row
|
||||
* @return array
|
||||
*/
|
||||
public function export($row): array
|
||||
{
|
||||
throw new \RuntimeException('export not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $row
|
||||
* @param mixed $index
|
||||
* @return bool
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function import(array $row, $index): bool
|
||||
{
|
||||
throw new \RuntimeException('import not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the airline from the ICAO. Create it if it doesn't exist
|
||||
* @param $code
|
||||
|
||||
@@ -8,13 +8,14 @@ use App\Models\Traits\ExpensableTrait;
|
||||
|
||||
/**
|
||||
* Class Subfleet
|
||||
* @property int id
|
||||
* @property string type
|
||||
* @property string name
|
||||
* @property string ground_handling_multiplier
|
||||
* @property Fare[] fares
|
||||
* @property float cost_block_hour
|
||||
* @property float cost_delay_minute
|
||||
* @property int id
|
||||
* @property string type
|
||||
* @property string name
|
||||
* @property string ground_handling_multiplier
|
||||
* @property Fare[] fares
|
||||
* @property float cost_block_hour
|
||||
* @property float cost_delay_minute
|
||||
* @property Airline airline
|
||||
* @package App\Models
|
||||
*/
|
||||
class Subfleet extends Model
|
||||
|
||||
@@ -29,7 +29,7 @@ class AircraftExporter extends ImportExport
|
||||
* @param Aircraft $aircraft
|
||||
* @return array
|
||||
*/
|
||||
public function export(Aircraft $aircraft): array
|
||||
public function export($aircraft): array
|
||||
{
|
||||
$ret = [];
|
||||
foreach(self::$columns as $column) {
|
||||
|
||||
@@ -27,7 +27,7 @@ class AirportExporter extends ImportExport
|
||||
* @param Airport $airport
|
||||
* @return array
|
||||
*/
|
||||
public function export(Airport $airport): array
|
||||
public function export($airport): array
|
||||
{
|
||||
$ret = [];
|
||||
foreach(self::$columns as $column) {
|
||||
|
||||
@@ -30,7 +30,7 @@ class ExpenseExporter extends ImportExport
|
||||
* @param Expense $expense
|
||||
* @return array
|
||||
*/
|
||||
public function export(Expense $expense): array
|
||||
public function export($expense): array
|
||||
{
|
||||
$ret = [];
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class FareExporter extends ImportExport
|
||||
* @param Fare $fare
|
||||
* @return array
|
||||
*/
|
||||
public function export(Fare $fare): array
|
||||
public function export($fare): array
|
||||
{
|
||||
$ret = [];
|
||||
foreach(self::$columns as $column) {
|
||||
|
||||
@@ -28,7 +28,7 @@ class FlightExporter extends ImportExport
|
||||
* @param Flight $flight
|
||||
* @return array
|
||||
*/
|
||||
public function export(Flight $flight): array
|
||||
public function export($flight): array
|
||||
{
|
||||
$ret = [];
|
||||
foreach(self::$columns as $column) {
|
||||
|
||||
@@ -29,7 +29,7 @@ class SubfleetExporter extends ImportExport
|
||||
* @param Subfleet $subfleet
|
||||
* @return array
|
||||
*/
|
||||
public function export(Subfleet $subfleet): array
|
||||
public function export($subfleet): array
|
||||
{
|
||||
$ret = [];
|
||||
foreach(self::$columns as $column) {
|
||||
|
||||
@@ -20,7 +20,7 @@ class Money
|
||||
public static $subunit_multiplier;
|
||||
|
||||
/**
|
||||
* @param $amount
|
||||
* @param mixed $amount
|
||||
* @return MoneyBase
|
||||
* @throws \UnexpectedValueException
|
||||
* @throws \InvalidArgumentException
|
||||
@@ -32,7 +32,7 @@ class Money
|
||||
|
||||
/**
|
||||
* Create from a dollar amount
|
||||
* @param $amount
|
||||
* @param mixed $amount
|
||||
* @return Money
|
||||
* @throws \UnexpectedValueException
|
||||
* @throws \InvalidArgumentException
|
||||
@@ -46,7 +46,7 @@ class Money
|
||||
|
||||
/**
|
||||
* Convert a whole unit into it's subunit, e,g: dollar to cents
|
||||
* @param $amount
|
||||
* @param mixed $amount
|
||||
* @return float|int
|
||||
*/
|
||||
public static function convertToSubunit($amount)
|
||||
@@ -72,7 +72,7 @@ class Money
|
||||
|
||||
/**
|
||||
* Money constructor.
|
||||
* @param $amount
|
||||
* @param mixed $amount
|
||||
* @throws \UnexpectedValueException
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
@@ -143,7 +143,7 @@ class Money
|
||||
|
||||
/**
|
||||
* Add an amount
|
||||
* @param $amount
|
||||
* @param mixed $amount
|
||||
* @return Money
|
||||
* @throws \UnexpectedValueException
|
||||
* @throws \InvalidArgumentException
|
||||
@@ -160,7 +160,7 @@ class Money
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $percent
|
||||
* @param mixed $percent
|
||||
* @return $this
|
||||
* @throws \OutOfBoundsException
|
||||
* @throws \InvalidArgumentException
|
||||
|
||||
Reference in New Issue
Block a user