Formatting

This commit is contained in:
Nabeel Shahzad 2019-07-15 15:17:51 -04:00
parent 06d8f11ca3
commit c04bfb78c6
4 changed files with 11 additions and 18 deletions

View File

@ -2,8 +2,6 @@
namespace App\Http\Resources;
use App\Support\Units\Distance;
class Flight extends Response
{
/**

View File

@ -27,5 +27,4 @@ class Response extends Resource
}
}
}
}

View File

@ -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

View File

@ -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;
@ -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];
}