This is a coding exercise written in PHP to refactor the str2float()
function. The method accepts a string and returns a string formatted with
two decimal places.
Review and rewrite this function in a more direct, easier to understand, and precise manner.
In the project directory, run
composer install
To run the test suite, run
composer test
The current implementation has at least 2 identified bugs. Fix and test using
composer test-bug1
composer test-bug2
composer test-all