Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: add explicit calculator classes to handle all math related operations #52

Merged
merged 4 commits into from
Nov 13, 2017

Conversation

jordanbrauer
Copy link
Owner

Added a calculator interface along with an abstract calculator to facilitate a concrete calculator class.

Included by default are two calculators; SimpleCalculator and BinaryCalculator.

The SimpleCalculator uses the native PHP round function in conjunction with the basic mathematical operators (+, -, *, /, %), and the pow function for power.

The BinaryCalculator uses the bcmath library, thus adding a requirement for this component for the bcmath extension.

See #12 for original issue details.

@jordanbrauer jordanbrauer added this to the Production Ready v1.0.0 milestone Nov 13, 2017
@jordanbrauer jordanbrauer self-assigned this Nov 13, 2017
@jordanbrauer jordanbrauer changed the title Feat: add explicit calculator class to handle all math related operations Feat: add explicit calculator classes to handle all math related operations Nov 13, 2017
@jordanbrauer jordanbrauer merged commit 913f3fd into develop Nov 13, 2017
@jordanbrauer jordanbrauer deleted the math branch November 13, 2017 00:24
jordanbrauer added a commit that referenced this pull request Nov 13, 2017
* Update: changelog config file & composer script

* Feat: add explicit calculator classes to handle all math related operations (#52)

* Update: remove redundant import

* Feat: add abstract calculator class interface

* Feat: add simple calculator concrete class & write tests

* Feat: add binary calculator (bcmath) concrete class & write tests

* Feat: implement calculator into unit converter & unit calculate methods (#53)

* Fix: simplecalc bugs

* Feat: add new exceptin for missing calculator

* Fix: tests to use new calculator

* Fix: example file to use new calculator

* Feat: implement the calculator into the unit converter

* Update: scripts

* Update: readme to reflect new api

* Fix: formatting & docblocks

* Update: add codeclimate config & travis script updates

* Update: Add codeclimate badges:

* Fix: unit test missing @Covers & @uses docblock annotations

* Update: coverage scripts

* Update: add missing Code Climate YAML config file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant