Formatting
This commit is contained in:
parent
06d8f11ca3
commit
c04bfb78c6
@ -2,8 +2,6 @@
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Support\Units\Distance;
|
||||
|
||||
class Flight extends Response
|
||||
{
|
||||
/**
|
||||
|
@ -27,5 +27,4 @@ class Response extends Resource
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,12 +5,9 @@ namespace App\Providers;
|
||||
use Exception;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use PhpUnitsOfMeasure\Exception\DuplicateUnitNameOrAlias;
|
||||
use PhpUnitsOfMeasure\Exception\NonStringUnitName;
|
||||
use PhpUnitsOfMeasure\Exception\UnknownUnitOfMeasure;
|
||||
use PhpUnitsOfMeasure\PhysicalQuantity\Length;
|
||||
use PhpUnitsOfMeasure\PhysicalQuantity\Temperature;
|
||||
use PhpUnitsOfMeasure\UnitOfMeasure;
|
||||
|
||||
/**
|
||||
* Add new measurement units to PhpUnitsOfMeasure
|
||||
|
@ -7,6 +7,7 @@ use App\Support\Units\Distance;
|
||||
use App\Support\Units\Pressure;
|
||||
use App\Support\Units\Temperature;
|
||||
use App\Support\Units\Velocity;
|
||||
use function count;
|
||||
use PhpUnitsOfMeasure\Exception\NonNumericValue;
|
||||
use PhpUnitsOfMeasure\Exception\NonStringUnitName;
|
||||
|
||||
@ -392,8 +393,6 @@ class Metar implements \ArrayAccess
|
||||
if (isset($this->result[$parameter])) {
|
||||
return $this->result[$parameter];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -483,8 +482,8 @@ class Metar implements \ArrayAccess
|
||||
$this->raw_parts = explode(' ', $this->raw);
|
||||
$current_method = 0;
|
||||
|
||||
$raw_part_count = \count($this->raw_parts);
|
||||
$method_name_count = \count(static::$method_names);
|
||||
$raw_part_count = count($this->raw_parts);
|
||||
$method_name_count = count(static::$method_names);
|
||||
|
||||
while ($this->part < $raw_part_count) {
|
||||
$this->method = $current_method;
|
||||
@ -878,7 +877,7 @@ class Metar implements \ArrayAccess
|
||||
|
||||
// ICAO visibility (in meters)
|
||||
if (isset($found[2]) && !empty($found[2])) {
|
||||
$visibility = $this->createDistance((int)$found[2], 'm');
|
||||
$visibility = $this->createDistance((int) $found[2], 'm');
|
||||
} // US visibility (in miles)
|
||||
else {
|
||||
if (isset($found[3]) && !empty($found[3])) {
|
||||
@ -927,7 +926,7 @@ class Metar implements \ArrayAccess
|
||||
return false;
|
||||
}
|
||||
|
||||
$meters = $this->createDistance((int)$found[1], 'm');
|
||||
$meters = $this->createDistance((int) $found[1], 'm');
|
||||
$this->set_result_value('visibility_min', $meters);
|
||||
|
||||
if (isset($found[2]) && !empty($found[2])) {
|
||||
@ -1488,7 +1487,7 @@ class Metar implements \ArrayAccess
|
||||
$raw_parts = [];
|
||||
|
||||
// Get all parts after trend part
|
||||
while ($this->part < \count($this->raw_parts)) {
|
||||
while ($this->part < count($this->raw_parts)) {
|
||||
if (preg_match($r, $this->raw_parts[$this->part], $found)) {
|
||||
// Get trend flag
|
||||
if (isset($found[2], static::$trends_flag_codes[$found[2]])) {
|
||||
@ -1618,7 +1617,7 @@ class Metar implements \ArrayAccess
|
||||
|
||||
$remarks = [];
|
||||
// Get all parts after
|
||||
while ($this->part < \count($this->raw_parts)) {
|
||||
while ($this->part < count($this->raw_parts)) {
|
||||
if (isset($this->raw_parts[$this->part])) {
|
||||
$remarks[] = $this->raw_parts[$this->part];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user