https://github.com/daar/bmi
A BMI calculator based on WHO data and definitions written in PHP
https://github.com/daar/bmi
Last synced: over 1 year ago
JSON representation
A BMI calculator based on WHO data and definitions written in PHP
- Host: GitHub
- URL: https://github.com/daar/bmi
- Owner: daar
- License: mit
- Created: 2023-04-27T12:43:15.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-03T03:22:50.000Z (over 1 year ago)
- Last Synced: 2025-02-03T04:24:32.219Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 2.06 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# A BMI calculator based on WHO data and definitions.
[](https://packagist.org/packages/daar/bmi)
[](https://github.com/daar/bmi/actions?query=workflow%3Arun-tests+branch%3Amain)
[](https://github.com/daar/bmi/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[](https://packagist.org/packages/daar/bmi)
## Installation
You can install the package via composer:
```bash
composer require daar/bmi
```
## Usage
```php
use Daar\Bmi\BMI;
// Calculate the BMI
$bmi = BMI::calculate($weight, $length);
// Calculate the BMI category according to the WHO standard
$category = BMI::category($weight, $length, $gender, $ageInMonths);
```
## Testing
```bash
composer test
```
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [daar](https://github.com/daar)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.