pablorsk / argentina-data-generator
Argentina data generator for CUIT and CBU numbers
Installs: 19 097
Dependents: 0
Suggesters: 0
Security: 0
Stars: 10
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^7.1|^8.0
- fakerphp/faker: ^1.14.1
Requires (Dev)
- codedungeon/phpunit-result-printer: 0.30.1
- pablorsk/cbu-validator-php: ^1.0
- phpunit/phpunit: 9.5.5
- reyesoft/ci: 1.4.3
- sebastian/phpcpd: 6.0.3
This package is auto-updated.
Last update: 2024-12-13 15:29:15 UTC
README
Generate CBU and CUIT/CUIL
Installation
Add the ArgentinaDataGenerator library to your composer.json
file:
composer require pablorsk/argentina-data-generator --dev
Usage
Use the new ArgentinaDataGenerator\CuitFakerProvider
class in combination with Faker to produce CUIT numbers.
<?php
$faker = Faker\Factory::create();
$faker->addProvider(new \ArgentinaDataGenerator\CuitFakerProvider($faker));
for ($i=0; $i < 5; $i++) {
echo $faker->cuit, "\n";
}
This snippet generates 5 awesome CUIT/CUIL valid numbers. Here is an example output from CuitFaker:
20-48028763-1
33-25497340-3
33-35036407-8
20-12145175-2
33-37145386-0
Generators
\ArgentinaDataGenerator\CuitFakerProvider
cuit // 33-37145386-0
cuitNumber // 33371453860
dni // 37145386
\ArgentinaDataGenerator\CbuFakerProvider
cbu // 6999444785661157353820