Focado em fornecer dados válidos aleatórios para uso em ambiente de desenvolvimento ou homologação.
PHP >= 7.4;
composer install
Na raiz do projeto.
composer tests
Na raiz do projeto.
composer analyse
Na raiz do projeto.
composer phpcs
Na raiz do projeto.
composer all
composer require diego-brocanelli/money_to_word dev-main
<?php
require_once __DIR__.'/vendor/autoload.php';
use Random\Faker;
echo (new Faker())->cpf()->generate(); // output: '64893836757'
<?php
require_once __DIR__.'/vendor/autoload.php';
use Random\Faker;
echo (new Faker())->cpf()->generateWithMask(); // output: '648.938.367-57'
<?php
require_once __DIR__.'/vendor/autoload.php';
use Random\Faker;
(new Faker())->cpf()->isValid('56359989093') ; //output: true
// ou
(new Faker())->cpf()->isValid('563.599.890-93') ; //output: true
<?php
require_once __DIR__.'/vendor/autoload.php';
use Random\Faker;
echo (new Faker())->cnpj()->generate(); // output: '77496644000147'
<?php
require_once __DIR__.'/vendor/autoload.php';
use Random\CNPJ;
echo (new Faker())->cnpj()->generateWithMask(); // output: '99.177.535/0001-08'
<?php
require_once __DIR__.'/vendor/autoload.php';
use Random\Faker;
(new Faker())->cnpj()->isValid('99177535000108'); //output: true
// ou
(new Faker())->cnpj()->isValid('99.177.535/0001-08'); //output: true