Skip to content

Add UK National Insurance number generator#89

Merged
pimjansen merged 2 commits intoFakerPHP:mainfrom
krsriq:FEAT/add_uk_nino
Dec 1, 2020
Merged

Add UK National Insurance number generator#89
pimjansen merged 2 commits intoFakerPHP:mainfrom
krsriq:FEAT/add_uk_nino

Conversation

@krsriq
Copy link
Copy Markdown

@krsriq krsriq commented Nov 30, 2020

This PR

  • Adds a new feature ...
  • Covered by tests
  • Fixes #nnnn

Signed-off-by: Daniel Schmelz <daniel@schmelz.org>
Signed-off-by: Daniel Schmelz <daniel@schmelz.org>
@pimjansen pimjansen added the enhancement New feature or request label Nov 30, 2020
do {
$prefixLetters = strtoupper(static::lexify('??'));
} while (
in_array($prefixLetters[0], ['D', 'F', 'I', 'Q', 'U', 'V'])
Copy link
Copy Markdown

@IonBazan IonBazan Nov 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about choosing a random element from: ['?O', '?D', ?'F', ?'I', '?Q', ?'U', '?V', 'D?', 'F?', 'I?', 'Q?', 'U?', 'V?', 'BG', 'GB', 'NK', 'KN', 'TN', 'NT', 'ZZ'] instead and then using lexify on the result?

Never mind, the condition is opposite 🤦‍♂️

@bram-pkg
Copy link
Copy Markdown
Member

bram-pkg commented Dec 1, 2020

Looks good to me, can you also document this in https://github.com/FakerPHP/fakerphp.github.io?

@krsriq
Copy link
Copy Markdown
Author

krsriq commented Dec 1, 2020

Looks good to me, can you also document this in https://github.com/FakerPHP/fakerphp.github.io?

Yes, will do!

@pimjansen pimjansen merged commit b542e97 into FakerPHP:main Dec 1, 2020
@pimjansen
Copy link
Copy Markdown

Thanks!

@krsriq krsriq deleted the FEAT/add_uk_nino branch December 1, 2020 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants