tohmua/slk581
Composer 安装命令:
composer require tohmua/slk581
包简介
Generate SLK581 codes
关键字:
README 文档
README
SLK581
This project generates SLK581 Codes. More info on SLK581 codes can be found here. More detailed notes on the specification can be found here.
Install
composer require tohmua/slk581
Use
$slk581 = new SLK581\SLK581(); $slk581->generate( $firstName = 'firstname', $lastName = 'lastname', $dateOfBirth = '11/11/2016', // must be formatted dd/mm/yyyy $gender = 2 // see documentation or 'src/Fields/Interfaces/Gender.php' for gender codes ); // ASNIR111120162
Errors
generate() method returns a string of a valid SLK581 code on success or FLASE on Failure.
To get the error message you can call the errorMessage() method.
$slk581 = new SLK581\SLK581(); $slk581->generate( $firstName = 'firstname', $lastName = 'lastname', $dateOfBirth = '', $gender = 2 ); // (bool) FALSE $slk581->errorMessage(); //SLK581 Error: No Date of Birth supplied. This is required.
Tests
To run: composer test
The code coverage report can be found in tests/_output however this is git ignored but it will be generated automatically for you when you run the test suite.
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-11-22