Skip to content

Commit

Permalink
Add: method to determine which calculator is in use
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanbrauer committed Feb 3, 2018
1 parent a93b001 commit bb8b7d8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/UnitConverter/UnitConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,18 @@ protected function calculatorExists (): bool

return false;
}

/**
* Determine which calculator is currently being used
*
* @internal
* @return null|string
*/
protected function whichCalculator ()
{
if ($this->calculatorExists())
return get_class($this->calculator);

return null;
}
}

0 comments on commit bb8b7d8

Please sign in to comment.