chuano / spain-document-generator
Spanish CIF, NIF and NIE random generator.
Installs: 16 947
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=7.1
- ext-mbstring: *
Requires (Dev)
- phpunit/phpunit: ^9
This package is auto-updated.
Last update: 2025-01-29 06:19:52 UTC
README
Spanish CIF, NIF and NIE random generator.
Installation
composer require chuano/spain-document-generator
Usage
All parameters are optional. By default the separator will be empty and the type will be B.
<?php require_once 'vendor/autoload.php'; use Chuano\Util\SpainDocumentGenerator\SpainDocumentGenerator; $generator = new SpainDocumentGenerator(); // CIF type 'B' and control digit separator char '-' $cif = $generator->cif('B', '-'); // Control digit char '-' $nif = $generator->nif('-'); // Control digit char '-' $nie = $generator->nie('-');