Laravel 9 Update (#1413)
Update to Laravel 9 and PHP 8+ Co-authored-by: B.Fatih KOZ <fatih.koz@gmail.com>
This commit is contained in:
@@ -16,9 +16,6 @@ class Acars extends Resource
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*
|
||||
* @throws \PhpUnitsOfMeasure\Exception\NonNumericValue
|
||||
* @throws \PhpUnitsOfMeasure\Exception\NonStringUnitName
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
@@ -27,11 +24,11 @@ class Acars extends Resource
|
||||
|
||||
// Set these to the response units
|
||||
$distance = !empty($res['distance']) ? $res['distance'] : 0;
|
||||
$distance = new Distance($distance, config('phpvms.internal_units.distance'));
|
||||
$distance = Distance::make($distance, config('phpvms.internal_units.distance'));
|
||||
$res['distance'] = $distance->getResponseUnits();
|
||||
|
||||
$fuel = !empty($res['fuel']) ? $res['fuel'] : 0;
|
||||
$fuel = new Fuel($fuel, config('phpvms.internal_units.fuel'));
|
||||
$fuel = Fuel::make($fuel, config('phpvms.internal_units.fuel'));
|
||||
$res['fuel'] = $fuel->getResponseUnits();
|
||||
|
||||
$res['pirep'] = Pirep::make($this->whenLoaded('pirep'));
|
||||
|
||||
Reference in New Issue
Block a user