Rename toInt to toNumber

This commit is contained in:
Nabeel Shahzad
2018-02-20 15:32:49 -06:00
parent b9e88527dd
commit 8386951511
7 changed files with 33 additions and 6 deletions

View File

@@ -19,6 +19,15 @@ class Altitude extends \PhpUnitsOfMeasure\PhysicalQuantity\Length implements Arr
return (string) round($value, 2);
}
/**
* Return value in native unit as integer
* @return array
*/
public function toNumber()
{
return $this->toArray();
}
/**
* For the HTTP Resource call
*/

View File

@@ -23,7 +23,7 @@ class Distance extends \PhpUnitsOfMeasure\PhysicalQuantity\Length implements Arr
* Return value in native unit as integer
* @return array
*/
public function toInt()
public function toNumber()
{
return $this->toArray();
}

View File

@@ -23,7 +23,7 @@ class Fuel extends \PhpUnitsOfMeasure\PhysicalQuantity\Mass implements Arrayable
* Return value in native unit as integer
* @return array
*/
public function toInt()
public function toNumber()
{
return $this->toArray();
}

View File

@@ -19,6 +19,15 @@ class Mass extends \PhpUnitsOfMeasure\PhysicalQuantity\Mass implements Arrayable
return (string) round($value, 2);
}
/**
* Return value in native unit as integer
* @return array
*/
public function toNumber()
{
return $this->toArray();
}
/**
* For the HTTP Resource call
*/

View File

@@ -23,7 +23,7 @@ class Velocity extends \PhpUnitsOfMeasure\PhysicalQuantity\Velocity implements A
* Return value in native unit as integer
* @return array
*/
public function toInt()
public function toNumber()
{
return $this->toArray();
}

View File

@@ -19,6 +19,15 @@ class Volume extends \PhpUnitsOfMeasure\PhysicalQuantity\Volume implements Array
return (string) round($value, 2);
}
/**
* Return value in native unit as integer
* @return array
*/
public function toNumber()
{
return $this->toArray();
}
/**
* For the HTTP Resource call
*/