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:
Nabeel S
2022-03-14 11:45:18 -04:00
committed by GitHub
parent 00bf18c225
commit 12848091a2
340 changed files with 6130 additions and 4502 deletions

View File

@@ -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'));