pablorsk/argentina-data-generator

Argentina data generator for CUIT and CBU numbers

0.0.6 2022-09-13 10:42 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