move currency to config file; change units to their own group in settings
This commit is contained in:
@@ -15,7 +15,7 @@ class Altitude extends \PhpUnitsOfMeasure\PhysicalQuantity\Length implements Arr
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
$unit = setting('general.altitude_unit');
|
||||
$unit = setting('units.altitude');
|
||||
$value = $this->toUnit($unit);
|
||||
return (string) round($value, 2);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class Distance extends \PhpUnitsOfMeasure\PhysicalQuantity\Length implements Arr
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
$unit = setting('general.distance_unit');
|
||||
$unit = setting('units.distance');
|
||||
$value = $this->toUnit($unit);
|
||||
return (string) round($value, 2);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class Fuel extends \PhpUnitsOfMeasure\PhysicalQuantity\Mass implements Arrayable
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
$unit = setting('general.fuel_unit');
|
||||
$unit = setting('units.fuel');
|
||||
$value = $this->toUnit($unit);
|
||||
return (string) round($value, 2);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class Mass extends \PhpUnitsOfMeasure\PhysicalQuantity\Mass implements Arrayable
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
$unit = setting('general.weight_unit');
|
||||
$unit = setting('units.weight');
|
||||
$value = $this->toUnit($unit);
|
||||
return (string) round($value, 2);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class Velocity extends \PhpUnitsOfMeasure\PhysicalQuantity\Velocity implements A
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
$unit = setting('general.speed_unit');
|
||||
$unit = setting('units.speed');
|
||||
$value = $this->toUnit($unit);
|
||||
return (string) round($value, 2);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class Volume extends \PhpUnitsOfMeasure\PhysicalQuantity\Volume implements Array
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
$unit = setting('general.liquid_unit');
|
||||
$unit = setting('units.volume');
|
||||
$value = $this->toUnit($unit);
|
||||
return (string) round($value, 2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user