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

一个基于中国农历预测您宝宝性别的 PHP 包

安装

您可以通过 composer 安装此包

composer require bdp-raymon/chinese-gender-prediction

用法

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();

测试

composer test

变更日志

有关最近更改的更多信息,请参阅 CHANGELOG

贡献

有关详细信息,请参阅 CONTRIBUTING

安全

如果您发现任何与安全相关的问题,请通过电子邮件 alishabani9270@gmail.com 联系我们,而不是使用问题跟踪器。

致谢

许可证

MIT 许可证(MIT)。有关更多信息,请参阅 许可证文件

PHP 包模板

此包是使用 PHP 包模板 生成的。

待办事项

  • 配置 scrutinizer
  • 配置 styleci
  • 配置 travis