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\Repository;
/**
* Class ClavesUnidades
* @method ClaveUnidad obtain(string $id)
*/
class ClavesUnidades extends AbstractCatalogIdentifiable
{
protected function catalogName(): string
return Repository::CFDI_40_CLAVES_UNIDADES;
}
* @param array<string, mixed> $data
* @return ClaveUnidad
public function create(array $data): EntryIdentifiable
return new ClaveUnidad(
$data['id'],
$data['texto'],
$data['descripcion'],
$data['notas'],
$data['simbolo'],
($data['vigencia_desde']) ? strtotime($data['vigencia_desde']) : 0,
($data['vigencia_hasta']) ? strtotime($data['vigencia_hasta']) : 0
);