for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace PhpCfdi\SatCatalogos\CFDI40;
use PhpCfdi\SatCatalogos\Common\AbstractCatalogIdentifiable;
use PhpCfdi\SatCatalogos\Common\EntryIdentifiable;
use PhpCfdi\SatCatalogos\Helpers\ScalarValues;
use PhpCfdi\SatCatalogos\Repository;
/**
* Catálogo de Tipos de comprobante
* @method TipoComprobante obtain(string $id)
*/
class TiposComprobantes extends AbstractCatalogIdentifiable
{
protected function catalogName(): string
return Repository::CFDI_40_TIPOS_COMPROBANTES;
}
* @param array<string, scalar> $data
* @return TipoComprobante
public function create(array $data): EntryIdentifiable
$values = new ScalarValues($data);
return new TipoComprobante(
$values->string('id'),
$values->string('texto'),
$values->string('valor_maximo'),
$values->timestamp('vigencia_desde'),
$values->timestamp('vigencia_hasta'),
);