2017 © Pedro Peláez
 

library slk581

Generate SLK581 codes

image

tohmua/slk581

Generate SLK581 codes

  • Tuesday, November 22, 2016
  • by Tohmua
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Build Status, (*1)

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., (*2)

Install

composer require tohmua/slk581, (*3)

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., (*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.

Tests

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)

The Versions

22/11 2016

dev-master

9999999-dev

Generate SLK581 codes

  Sources   Download

MIT

The Requires

  • php ^5.6 || ^7.0

 

The Development Requires

slk581

22/11 2016

v0.1.0

0.1.0.0

Generate SLK581 codes

  Sources   Download

MIT

The Requires

  • php ^5.6 || ^7.0

 

The Development Requires

slk581