bdp-raymon/chinese-gender-prediction

v0.2.0 2021-02-15 12:41 UTC

This package is auto-updated.

Last update: 2024-09-15 20:33:04 UTC


README

Latest Version on Packagist Build Status Quality Score Total Downloads

A php package for predict your baby gender base on chinese calendar

Installation

You can install the package via composer:

composer require bdp-raymon/chinese-gender-prediction

Usage

use BdpRaymon\ChineseGenderPrediction\ChineseGenderPrediction;

// initialize class
$prediction = new ChineseGenderPrediction();

// set mother age
$prediction->motherAge(18);

// set pregnancy month
$prediction->pregnancyMonth(0);

// get the prediction, it could be either boy or girl
$prediction->predict(); // boy


// use of chaining
$gender = (new ChineseGenderPrediction())
            ->motherAge(18)
            ->pregnancyMonth(0)
            ->predict();


// or you could use the config constructor
$gender = (new ChineseGenderPrediction([
            'mother_age' => 18,
            'pregnancy_month' => 0
           ]))
            ->predict();

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email alishabani9270@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

PHP Package Boilerplate

This package was generated using the PHP Package Boilerplate.

TODO

  • config scrutinizer
  • config styleci
  • config travis