Refactor all of the unit conversion code

This commit is contained in:
Nabeel Shahzad
2018-04-07 20:52:12 -05:00
parent eae5989845
commit c102a0d858
25 changed files with 365 additions and 362 deletions

View File

@@ -27,7 +27,7 @@ class Flight extends Resource
// Return multiple measures so the client can pick what they want
if ($this->distance instanceof Distance) {
$flight['distance'] = $this->distance->toObject();
$flight['distance'] = $this->distance->units;
}
$flight['airline'] = new Airline($this->airline);