-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from eclipxe13/version-2.9.0
Add CCP 3.1 & maintenance (Version 2.9.0)
- Loading branch information
Showing
110 changed files
with
9,371 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phive xmlns="https://phar.io/phive"> | ||
<phar name="php-cs-fixer" version="^3.49.0" installed="3.49.0" location="./tools/php-cs-fixer" copy="false"/> | ||
<phar name="phpcs" version="^3.8.1" installed="3.8.1" location="./tools/phpcs" copy="false"/> | ||
<phar name="phpcbf" version="^3.8.1" installed="3.8.1" location="./tools/phpcbf" copy="false"/> | ||
<phar name="phpstan" version="^1.10.57" installed="1.10.57" location="./tools/phpstan" copy="false"/> | ||
<phar name="composer-normalize" version="^2.42.0" installed="2.42.0" location="./tools/composer-normalize" copy="false"/> | ||
<phar name="php-cs-fixer" version="^3.59.3" installed="3.59.3" location="./tools/php-cs-fixer" copy="false"/> | ||
<phar name="phpcs" version="^3.10.1" installed="3.10.1" location="./tools/phpcs" copy="false"/> | ||
<phar name="phpcbf" version="^3.10.1" installed="3.10.1" location="./tools/phpcbf" copy="false"/> | ||
<phar name="phpstan" version="^1.11.5" installed="1.11.5" location="./tools/phpstan" copy="false"/> | ||
<phar name="composer-normalize" version="^2.43.0" installed="2.43.0" location="./tools/composer-normalize" copy="false"/> | ||
</phive> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace PhpCfdi\SatCatalogosPopulate\Importers\Ccp31\Injectors; | ||
|
||
use PhpCfdi\SatCatalogosPopulate\AbstractCsvInjector; | ||
use PhpCfdi\SatCatalogosPopulate\Database\DataFields; | ||
use PhpCfdi\SatCatalogosPopulate\Database\DataTable; | ||
use PhpCfdi\SatCatalogosPopulate\Database\DateDataField; | ||
use PhpCfdi\SatCatalogosPopulate\Database\TextDataField; | ||
use PhpCfdi\SatCatalogosPopulate\Utils\CsvFile; | ||
use RuntimeException; | ||
|
||
class AutorizacionesNaviero extends AbstractCsvInjector | ||
{ | ||
public function checkHeaders(CsvFile $csv): void | ||
{ | ||
$csv->move(3); | ||
$expected = [ | ||
'Número de autorización', | ||
'Inicio de vigencia', | ||
'Fin de vigencia', | ||
]; | ||
$headers = $csv->readLine(); | ||
if ($expected !== $headers) { | ||
throw new RuntimeException("The headers did not match on file {$this->sourceFile()}"); | ||
} | ||
|
||
$csv->next(); | ||
} | ||
|
||
public function dataTable(): DataTable | ||
{ | ||
return new DataTable('ccp_31_autorizaciones_naviero', new DataFields([ | ||
new TextDataField('id'), | ||
new DateDataField('vigencia_desde'), | ||
new DateDataField('vigencia_hasta'), | ||
])); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace PhpCfdi\SatCatalogosPopulate\Importers\Ccp31\Injectors; | ||
|
||
use PhpCfdi\SatCatalogosPopulate\AbstractCsvInjector; | ||
use PhpCfdi\SatCatalogosPopulate\Database\DataFields; | ||
use PhpCfdi\SatCatalogosPopulate\Database\DataTable; | ||
use PhpCfdi\SatCatalogosPopulate\Database\DateDataField; | ||
use PhpCfdi\SatCatalogosPopulate\Database\TextDataField; | ||
use PhpCfdi\SatCatalogosPopulate\Utils\CsvFile; | ||
use RuntimeException; | ||
|
||
class ClavesUnidades extends AbstractCsvInjector | ||
{ | ||
public function checkHeaders(CsvFile $csv): void | ||
{ | ||
$csv->move(3); | ||
$expected = [ | ||
'Clave unidad', | ||
'Nombre', | ||
'Descripción', | ||
'Nota', | ||
'Fecha de inicio de vigencia', | ||
'Fecha de fin de vigencia', | ||
'Símbolo', | ||
'Bandera', | ||
]; | ||
$headers = $csv->readLine(); | ||
|
||
if ($expected !== $headers) { | ||
throw new RuntimeException("The headers did not match on file {$this->sourceFile()}"); | ||
} | ||
|
||
$csv->next(); | ||
} | ||
|
||
public function dataTable(): DataTable | ||
{ | ||
return new DataTable('ccp_31_claves_unidades', new DataFields([ | ||
new TextDataField('id'), | ||
new TextDataField('texto'), | ||
new TextDataField('descripcion'), | ||
new TextDataField('nota'), | ||
new DateDataField('vigencia_desde'), | ||
new DateDataField('vigencia_hasta'), | ||
new TextDataField('simbolo'), | ||
new TextDataField('bandera'), | ||
])); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace PhpCfdi\SatCatalogosPopulate\Importers\Ccp31\Injectors; | ||
|
||
use PhpCfdi\SatCatalogosPopulate\AbstractCsvInjector; | ||
use PhpCfdi\SatCatalogosPopulate\Database\DataFields; | ||
use PhpCfdi\SatCatalogosPopulate\Database\DataTable; | ||
use PhpCfdi\SatCatalogosPopulate\Database\DateDataField; | ||
use PhpCfdi\SatCatalogosPopulate\Database\TextDataField; | ||
use PhpCfdi\SatCatalogosPopulate\Utils\CsvFile; | ||
use RuntimeException; | ||
|
||
class CodigosTransporteAereo extends AbstractCsvInjector | ||
{ | ||
public function checkHeaders(CsvFile $csv): void | ||
{ | ||
$csv->move(3); | ||
$expected = [ | ||
'Clave identificación', | ||
'Nacionalidad', | ||
'Nombre de la aerolínea', | ||
'Designador OACI', | ||
'Fecha de inicio de vigencia', | ||
'Fecha de fin de vigencia', | ||
]; | ||
$headers = $csv->readLine(); | ||
|
||
if ($expected !== $headers) { | ||
throw new RuntimeException("The headers did not match on file {$this->sourceFile()}"); | ||
} | ||
|
||
$csv->next(); | ||
} | ||
|
||
public function dataTable(): DataTable | ||
{ | ||
return new DataTable('ccp_31_codigos_transporte_aereo', new DataFields([ | ||
new TextDataField('id'), | ||
new TextDataField('nacionalidad'), | ||
new TextDataField('texto'), | ||
new TextDataField('designador_oaci'), | ||
new DateDataField('vigencia_desde'), | ||
new DateDataField('vigencia_hasta'), | ||
])); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace PhpCfdi\SatCatalogosPopulate\Importers\Ccp31\Injectors; | ||
|
||
use PhpCfdi\SatCatalogosPopulate\AbstractCsvInjector; | ||
use PhpCfdi\SatCatalogosPopulate\Database\DataFields; | ||
use PhpCfdi\SatCatalogosPopulate\Database\DataTable; | ||
use PhpCfdi\SatCatalogosPopulate\Database\PaddingDataField; | ||
use PhpCfdi\SatCatalogosPopulate\Database\TextDataField; | ||
use PhpCfdi\SatCatalogosPopulate\Utils\CsvFile; | ||
use RuntimeException; | ||
|
||
class Colonias extends AbstractCsvInjector | ||
{ | ||
public function checkHeaders(CsvFile $csv): void | ||
{ | ||
$csv->move(3); | ||
$expected = ['c_Colonia', 'c_CodigoPostal', 'Nombre del asentamiento']; | ||
$headers = $csv->readLine(); | ||
|
||
if ($expected !== $headers) { | ||
throw new RuntimeException("The headers did not match on file {$this->sourceFile()}"); | ||
} | ||
|
||
$csv->next(); | ||
} | ||
|
||
public function dataTable(): DataTable | ||
{ | ||
return new DataTable('ccp_31_colonias', new DataFields([ | ||
new PaddingDataField('colonia', '0', 4), | ||
new PaddingDataField('codigo_postal', '0', 5), | ||
new TextDataField('texto'), | ||
]), ['colonia', 'codigo_postal']); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace PhpCfdi\SatCatalogosPopulate\Importers\Ccp31\Injectors; | ||
|
||
use PhpCfdi\SatCatalogosPopulate\AbstractCsvInjector; | ||
use PhpCfdi\SatCatalogosPopulate\Database\DataFields; | ||
use PhpCfdi\SatCatalogosPopulate\Database\DataTable; | ||
use PhpCfdi\SatCatalogosPopulate\Database\DateDataField; | ||
use PhpCfdi\SatCatalogosPopulate\Database\PaddingDataField; | ||
use PhpCfdi\SatCatalogosPopulate\Database\TextDataField; | ||
use PhpCfdi\SatCatalogosPopulate\Database\ToBeDefinedDataField; | ||
use PhpCfdi\SatCatalogosPopulate\Utils\CsvFile; | ||
use RuntimeException; | ||
|
||
class CondicionesEspeciales extends AbstractCsvInjector | ||
{ | ||
public function checkHeaders(CsvFile $csv): void | ||
{ | ||
$csv->move(3); | ||
$expected = [ | ||
'Clave', | ||
'Descripción', | ||
'Fecha inicio de vigencia', | ||
'Fecha fin de vigencia', | ||
]; | ||
$headers = $csv->readLine(); | ||
|
||
if ($expected !== $headers) { | ||
throw new RuntimeException("The headers did not match on file {$this->sourceFile()}"); | ||
} | ||
|
||
$csv->next(); | ||
} | ||
|
||
public function dataTable(): DataTable | ||
{ | ||
return new DataTable('ccp_31_condiciones_especiales', new DataFields([ | ||
new PaddingDataField('id', '0', 2), | ||
new TextDataField('texto'), | ||
new ToBeDefinedDataField(new DateDataField('vigencia_desde')), | ||
new DateDataField('vigencia_hasta'), | ||
])); | ||
} | ||
} |
Oops, something went wrong.