Apply fixes from StyleCI

This commit is contained in:
Nabeel Shahzad
2018-08-26 16:40:04 +00:00
committed by StyleCI Bot
parent 20f46adbc4
commit 9596d88b48
407 changed files with 4032 additions and 3286 deletions

View File

@@ -5,14 +5,12 @@ namespace App\Support\Units;
use App\Interfaces\Unit;
use PhpUnitsOfMeasure\PhysicalQuantity\Length;
/**
* @package App\Support\Units
*/
class Altitude extends Unit
{
/**
* @param float $value
* @param string $unit
*
* @throws \PhpUnitsOfMeasure\Exception\NonNumericValue
* @throws \PhpUnitsOfMeasure\Exception\NonStringUnitName
*/
@@ -23,7 +21,7 @@ class Altitude extends Unit
$this->units = [
'm' => round($this->instance->toUnit('meters'), 2),
'km' => round($this->instance->toUnit('meters') / 1000, 2),
'km' => round($this->instance->toUnit('meters') / 1000, 2),
'ft' => round($this->instance->toUnit('feet'), 2),
];
}

View File

@@ -5,15 +5,14 @@ namespace App\Support\Units;
use App\Interfaces\Unit;
use PhpUnitsOfMeasure\PhysicalQuantity\Length;
/**
* @package App\Support\Units
*/
class Distance extends Unit
{
/**
* Distance constructor.
*
* @param float $value
* @param string $unit
*
* @throws \PhpUnitsOfMeasure\Exception\NonNumericValue
* @throws \PhpUnitsOfMeasure\Exception\NonStringUnitName
*/

View File

@@ -5,14 +5,12 @@ namespace App\Support\Units;
use App\Interfaces\Unit;
use PhpUnitsOfMeasure\PhysicalQuantity\Mass;
/**
* @package App\Support\Units
*/
class Fuel extends Unit
{
/**
* @param float $value
* @param string $unit
*
* @throws \PhpUnitsOfMeasure\Exception\NonNumericValue
* @throws \PhpUnitsOfMeasure\Exception\NonStringUnitName
*/

View File

@@ -5,14 +5,12 @@ namespace App\Support\Units;
use App\Interfaces\Unit;
use PhpUnitsOfMeasure\PhysicalQuantity\Mass as MassUnit;
/**
* @package App\Support\Units
*/
class Mass extends Unit
{
/**
* @param float $value
* @param string $unit
*
* @throws \PhpUnitsOfMeasure\Exception\NonNumericValue
* @throws \PhpUnitsOfMeasure\Exception\NonStringUnitName
*/

View File

@@ -7,13 +7,13 @@ use PhpUnitsOfMeasure\PhysicalQuantity\Temperature as TemperatureUnit;
/**
* Composition for the converter
* @package App\Support\Units
*/
class Temperature extends Unit
{
/**
* @param float $value
* @param string $unit
*
* @throws \PhpUnitsOfMeasure\Exception\NonNumericValue
* @throws \PhpUnitsOfMeasure\Exception\NonStringUnitName
*/

View File

@@ -6,26 +6,27 @@ use Illuminate\Contracts\Support\Arrayable;
/**
* Class Time
* @package App\Support\Units
*/
class Time implements Arrayable
{
public $hours,
$minutes;
public $hours;
public $minutes;
/**
* @param $minutes
* @param $hours
*
* @return static
*/
public static function init($minutes, $hours)
{
return new Time($minutes, $hours);
return new self($minutes, $hours);
}
/**
* Pass just minutes to figure out how many hours
* Or both hours and minutes
*
* @param $minutes
* @param $hours
*/
@@ -44,6 +45,7 @@ class Time implements Arrayable
/**
* Get the total number minutes, adding up the hours
*
* @return float|int
*/
public function getMinutes()
@@ -53,7 +55,9 @@ class Time implements Arrayable
/**
* Alias to getMinutes()
*
* @alias getMinutes()
*
* @return float|int
*/
public function asInt()
@@ -63,6 +67,7 @@ class Time implements Arrayable
/**
* Return a time string
*
* @return string
*/
public function __toString()

View File

@@ -7,13 +7,13 @@ use PhpUnitsOfMeasure\PhysicalQuantity\Velocity as VelocityUnit;
/**
* Class Velocity
* @package App\Support\Units
*/
class Velocity extends Unit
{
/**
* @param float $value
* @param string $unit
*
* @throws \PhpUnitsOfMeasure\Exception\NonNumericValue
* @throws \PhpUnitsOfMeasure\Exception\NonStringUnitName
*/

View File

@@ -7,13 +7,13 @@ use PhpUnitsOfMeasure\PhysicalQuantity\Volume as VolumeUnit;
/**
* Wrap the converter class
* @package App\Support\Units
*/
class Volume extends Unit
{
/**
* @param float $value
* @param string $unit
*
* @throws \PhpUnitsOfMeasure\Exception\NonNumericValue
* @throws \PhpUnitsOfMeasure\Exception\NonStringUnitName
*/