https://github.com/sujalpatel2209/calculator_package
https://github.com/sujalpatel2209/calculator_package
calculator first package sujalpatel
Last synced: 21 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/sujalpatel2209/calculator_package
- Owner: sujalpatel2209
- License: mit
- Created: 2019-10-04T12:43:46.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-08T07:06:35.000Z (over 6 years ago)
- Last Synced: 2025-12-14T18:53:09.901Z (6 months ago)
- Topics: calculator, first, package, sujalpatel
- Language: PHP
- Size: 13.7 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Calculator
[](https://packagist.org/packages/sujalpatel/calculator)
[](https://travis-ci.org/sujalpatel2209/calculator_package)
[](https://scrutinizer-ci.com/g/sujalpatel2209/calculator_package/?branch=master)
[](https://scrutinizer-ci.com/code-intelligence)
[](https://packagist.org/packages/sujalpatel/calculator)
Simple Calculation Function Addition, Subtraction and Multiplication.
## Installation
You can install the package via composer:
```bash
composer require sujalpatel/calculator
```
## Usage
**Add Function**
``` php
use Sujalpatel\Calculator\Calculator;
public function addition()
{
return Calculator::add(5,5); // Answer: 5 + 5 = 5
}
```
**Sub Function**
``` php
use Sujalpatel\Calculator\Calculator;
public function subtraction()
{
return Calculator::sub(10,5); // Answer: 10 - 5 = 5
}
```
**Multi Function**
``` php
use Sujalpatel\Calculator\Calculator;
public function multiplication()
{
return Calculator::multi(2,5); // Answer: 2 * 5 = 10
}
```
### Testing
``` bash
composer test
```
### Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
### Security
If you discover any security related issues, please email sujalpatel022@gmail.com instead of using the issue tracker.
## Credits
- [Sujal Patel](https://github.com/sujalpatel)
- [Laravel Package Boilerplate](https://laravelpackageboilerplate.com)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.