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;
/**
* Catálogo de aduanas
* @method Aduana obtain(string $id)
*/
class Aduanas extends AbstractCatalogIdentifiable
{
protected function catalogName(): string
return Repository::CFDI_40_ADUANAS;
}
* @param array<string, mixed> $data
* @return Aduana
public function create(array $data): EntryIdentifiable
return new Aduana(
$data['id'],
$data['texto'],
($data['vigencia_desde']) ? strtotime($data['vigencia_desde']) : 0,
($data['vigencia_hasta']) ? strtotime($data['vigencia_hasta']) : 0
);