dev-master
9999999-devGenerate SLK581 codes
MIT
The Requires
- php ^5.6 || ^7.0
The Development Requires
slk581
v0.1.0
0.1.0.0Generate SLK581 codes
MIT
The Requires
- php ^5.6 || ^7.0
The Development Requires
slk581
Wallogit.com
2017 © Pedro Peláez
Generate SLK581 codes
This project generates SLK581 Codes. More info on SLK581 codes can be found here. More detailed notes on the specification can be found here., (*2)
composer require tohmua/slk581, (*3)
$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
generate() method returns a string of a valid SLK581 code on success or FLASE on Failure., (*4)
To get the error message you can call the errorMessage() method., (*5)
$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.
To run: composer test, (*6)
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., (*7)
Generate SLK581 codes
MIT
slk581
Generate SLK581 codes
MIT
slk581