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

@@ -8,7 +8,6 @@ use App\Support\Units\Pressure;
use App\Support\Units\Temperature;
use App\Support\Units\Velocity;
use function count;
use Illuminate\Support\Facades\Log;
use PhpUnitsOfMeasure\Exception\NonNumericValue;
use PhpUnitsOfMeasure\Exception\NonStringUnitName;
@@ -403,14 +402,11 @@ class Metar implements \ArrayAccess
* @param int|float $value
* @param string $unit "feet" or "meters"
*
* @throws NonStringUnitName
* @throws NonNumericValue
*
* @return Altitude
*/
protected function createAltitude($value, $unit)
{
return new Altitude((float) $value, $unit);
return Altitude::make((float) $value, $unit);
}
/**
@@ -419,14 +415,11 @@ class Metar implements \ArrayAccess
* @param int|float $value
* @param string $unit "m" (meters) or "mi" (miles)
*
* @throws NonNumericValue
* @throws NonStringUnitName
*
* @return Distance
*/
protected function createDistance($value, $unit)
{
return new Distance((float) $value, $unit);
return Distance::make((float) $value, $unit);
}
/**
@@ -442,7 +435,7 @@ class Metar implements \ArrayAccess
*/
protected function createPressure($value, $unit)
{
return new Pressure((float) $value, $unit);
return Pressure::make((float) $value, $unit);
}
/**
@@ -458,7 +451,7 @@ class Metar implements \ArrayAccess
*/
protected function createTemperature($value, $unit)
{
return new Temperature((float) $value, $unit);
return Temperature::make((float) $value, $unit);
}
/**
@@ -474,7 +467,7 @@ class Metar implements \ArrayAccess
*/
protected function createVelocity($value, $unit)
{
return new Velocity((float) $value, $unit);
return Velocity::make((float) $value, $unit);
}
/**