-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
654 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
/composer.lock | ||
/node_modules | ||
/package-lock.json | ||
|
||
.DS_Store |
19 changes: 19 additions & 0 deletions
19
development/ElementsMaker/specifications/ConsumoDeCombustibles11.json
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,19 @@ | ||
{ | ||
"php-namespace": "CfdiUtils\\Elements\\ConsumoDeCombustibles11", | ||
"prefix": "consumodecombustibles11", | ||
"xml-namespace": "http://www.sat.gob.mx/ConsumoDeCombustibles11", | ||
"xml-schemalocation": "http://www.sat.gob.mx/sitio_internet/cfd/consumodecombustibles/consumodeCombustibles11.xsd", | ||
"version-attribute": "version", | ||
"version-value": "1.1", | ||
"root-element": "ConsumoDeCombustibles", | ||
"structure": { | ||
"Conceptos": { | ||
"ConceptoConsumoDeCombustibles": { | ||
"multiple": true, | ||
"Determinados": { | ||
"Determinado": {} | ||
} | ||
} | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
development/ElementsMaker/specifications/Donatarias11.json
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,11 @@ | ||
{ | ||
"php-namespace": "CfdiUtils\\Elements\\Donatarias11", | ||
"prefix": "donat", | ||
"xml-namespace": "http://www.sat.gob.mx/donat", | ||
"xml-schemalocation": "http://www.sat.gob.mx/sitio_internet/cfd/donat/donat11.xsd", | ||
"version-attribute": "version", | ||
"version-value": "1.1", | ||
"root-element": "Donatarias", | ||
"structure": { | ||
} | ||
} |
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,11 @@ | ||
{ | ||
"php-namespace": "CfdiUtils\\Elements\\Iedu10", | ||
"prefix": "iedu", | ||
"xml-namespace": "http://www.sat.gob.mx/iedu", | ||
"xml-schemalocation": "http://www.sat.gob.mx/sitio_internet/cfd/iedu/iedu.xsd", | ||
"version-attribute": "version", | ||
"version-value": "1.0", | ||
"root-element": "InstEducativas", | ||
"structure": { | ||
} | ||
} |
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,11 @@ | ||
{ | ||
"php-namespace": "CfdiUtils\\Elements\\Ine11", | ||
"prefix": "ine", | ||
"xml-namespace": "http://www.sat.gob.mx/ine", | ||
"xml-schemalocation": "http://www.sat.gob.mx/sitio_internet/cfd/ine/ine11.xsd", | ||
"version-attribute": "Version", | ||
"version-value": "1.1", | ||
"root-element": "Ine", | ||
"structure": { | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
development/ElementsMaker/specifications/LeyendasFiscales10.json
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,14 @@ | ||
{ | ||
"php-namespace": "CfdiUtils\\Elements\\LeyendasFiscales10", | ||
"prefix": "leyendasFisc", | ||
"xml-namespace": "http://www.sat.gob.mx/leyendasFiscales", | ||
"xml-schemalocation": "http://www.sat.gob.mx/sitio_internet/cfd/leyendasFiscales/leyendasFisc.xsd", | ||
"version-attribute": "version", | ||
"version-value": "1.0", | ||
"root-element": "LeyendasFiscales", | ||
"structure": { | ||
"Leyenda": { | ||
"multiple": true | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
development/ElementsMaker/specifications/NotariosPublicos10.json
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,22 @@ | ||
{ | ||
"php-namespace": "CfdiUtils\\Elements\\NotariosPublicos10", | ||
"prefix": "notariospublicos", | ||
"xml-namespace": "http://www.sat.gob.mx/notariospublicos", | ||
"xml-schemalocation": "http://www.sat.gob.mx/sitio_internet/cfd/notariospublicos/notariospublicos.xsd", | ||
"version-attribute": "Version", | ||
"version-value": "1.0", | ||
"root-element": "NotariosPublicos", | ||
"structure": { | ||
"DescInmuebles": { | ||
"DescInmueble": {} | ||
}, | ||
"DatosOperacion": {}, | ||
"DatosNotario": {}, | ||
"DatosEnajenante": { | ||
"DatosUnEnajenante": {} | ||
}, | ||
"DatosAdquiriente": { | ||
"DatosUnAdquiriente": {} | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
development/ElementsMaker/specifications/ParcialesConstruccion10.json
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,13 @@ | ||
{ | ||
"php-namespace": "CfdiUtils\\Elements\\ParcialesConstruccion10", | ||
"prefix": "servicioparcial", | ||
"xml-namespace": "http://www.sat.gob.mx/implocal", | ||
"xml-schemalocation": "http://www.sat.gob.mx/sitio_internet/cfd/implocal/implocal.xsd", | ||
"version-attribute": "Version", | ||
"version-value": "1.0", | ||
"root-element": "ParcialesConstruccion", | ||
"structure": { | ||
"Inmueble": { | ||
} | ||
} | ||
} |
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,25 @@ | ||
#!/bin/bash | ||
|
||
# Usage example: | ||
# Need composer install on the main project before | ||
# Omit extension .json in the arg | ||
# sh maker.sh Donatarias11 | ||
# sh maker.sh ConsumoDeCombustibles11 | ||
|
||
nameFile=$1 | ||
mainPath=$(pwd) | ||
dirPath=$(dirname $mainPath) | ||
if [ -z "$nameFile" ] | ||
then | ||
echo 'Need name of the file as arg' | ||
else | ||
# echo $dirPath | ||
echo "\nStart ElementsMaker $nameFile" | ||
echo rm -rf $dirPath/src/CfdiUtils/Elements/$nameFile | ||
mkdir -p $dirPath/src/CfdiUtils/Elements/$nameFile | ||
php $dirPath/development/bin/elements-maker.php $dirPath/development/ElementsMaker/specifications/$nameFile.json $dirPath/src/CfdiUtils/Elements/$nameFile | ||
echo composer dev:fix-style | ||
# vendor/bin/php-cs-fixer fix --verbose | ||
# bin/phpcbf --colors -sp src/ tests/ | ||
echo "End ElementsMaker $nameFile\n" | ||
fi |
25 changes: 25 additions & 0 deletions
25
src/CfdiUtils/Elements/ConsumoDeCombustibles11/ConceptoConsumoDeCombustibles.php
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,25 @@ | ||
<?php | ||
|
||
namespace CfdiUtils\Elements\ConsumoDeCombustibles11; | ||
|
||
use CfdiUtils\Elements\Common\AbstractElement; | ||
|
||
class ConceptoConsumoDeCombustibles extends AbstractElement | ||
{ | ||
public function getElementName(): string | ||
{ | ||
return 'consumodecombustibles11:ConceptoConsumoDeCombustibles'; | ||
} | ||
|
||
public function getDeterminados(): Determinados | ||
{ | ||
return $this->helperGetOrAdd(new Determinados()); | ||
} | ||
|
||
public function addDeterminados(array $attributes = []): Determinados | ||
{ | ||
$subject = $this->getDeterminados(); | ||
$subject->addAttributes($attributes); | ||
return $subject; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
src/CfdiUtils/Elements/ConsumoDeCombustibles11/Conceptos.php
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,28 @@ | ||
<?php | ||
|
||
namespace CfdiUtils\Elements\ConsumoDeCombustibles11; | ||
|
||
use CfdiUtils\Elements\Common\AbstractElement; | ||
|
||
class Conceptos extends AbstractElement | ||
{ | ||
public function getElementName(): string | ||
{ | ||
return 'consumodecombustibles11:Conceptos'; | ||
} | ||
|
||
public function addConceptoConsumoDeCombustibles(array $attributes = []): ConceptoConsumoDeCombustibles | ||
{ | ||
$subject = new ConceptoConsumoDeCombustibles($attributes); | ||
$this->addChild($subject); | ||
return $subject; | ||
} | ||
|
||
public function multiConceptoConsumoDeCombustibles(array ...$elementAttributes): self | ||
{ | ||
foreach ($elementAttributes as $attributes) { | ||
$this->addConceptoConsumoDeCombustibles($attributes); | ||
} | ||
return $this; | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
src/CfdiUtils/Elements/ConsumoDeCombustibles11/ConsumoDeCombustibles.php
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,35 @@ | ||
<?php | ||
|
||
namespace CfdiUtils\Elements\ConsumoDeCombustibles11; | ||
|
||
use CfdiUtils\Elements\Common\AbstractElement; | ||
|
||
class ConsumoDeCombustibles extends AbstractElement | ||
{ | ||
public function getElementName(): string | ||
{ | ||
return 'consumodecombustibles11:ConsumoDeCombustibles'; | ||
} | ||
|
||
public function getFixedAttributes(): array | ||
{ | ||
return [ | ||
'xmlns:consumodecombustibles11' => 'http://www.sat.gob.mx/ConsumoDeCombustibles11', | ||
'xsi:schemaLocation' => 'http://www.sat.gob.mx/ConsumoDeCombustibles11' | ||
. ' http://www.sat.gob.mx/sitio_internet/cfd/consumodecombustibles/consumodeCombustibles11.xsd', | ||
'version' => '1.1', | ||
]; | ||
} | ||
|
||
public function getConceptos(): Conceptos | ||
{ | ||
return $this->helperGetOrAdd(new Conceptos()); | ||
} | ||
|
||
public function addConceptos(array $attributes = []): Conceptos | ||
{ | ||
$subject = $this->getConceptos(); | ||
$subject->addAttributes($attributes); | ||
return $subject; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/CfdiUtils/Elements/ConsumoDeCombustibles11/Determinado.php
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,13 @@ | ||
<?php | ||
|
||
namespace CfdiUtils\Elements\ConsumoDeCombustibles11; | ||
|
||
use CfdiUtils\Elements\Common\AbstractElement; | ||
|
||
class Determinado extends AbstractElement | ||
{ | ||
public function getElementName(): string | ||
{ | ||
return 'consumodecombustibles11:Determinado'; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/CfdiUtils/Elements/ConsumoDeCombustibles11/Determinados.php
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,25 @@ | ||
<?php | ||
|
||
namespace CfdiUtils\Elements\ConsumoDeCombustibles11; | ||
|
||
use CfdiUtils\Elements\Common\AbstractElement; | ||
|
||
class Determinados extends AbstractElement | ||
{ | ||
public function getElementName(): string | ||
{ | ||
return 'consumodecombustibles11:Determinados'; | ||
} | ||
|
||
public function getDeterminado(): Determinado | ||
{ | ||
return $this->helperGetOrAdd(new Determinado()); | ||
} | ||
|
||
public function addDeterminado(array $attributes = []): Determinado | ||
{ | ||
$subject = $this->getDeterminado(); | ||
$subject->addAttributes($attributes); | ||
return $subject; | ||
} | ||
} |
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,23 @@ | ||
<?php | ||
|
||
namespace CfdiUtils\Elements\Donatarias11; | ||
|
||
use CfdiUtils\Elements\Common\AbstractElement; | ||
|
||
class Donatarias extends AbstractElement | ||
{ | ||
public function getElementName(): string | ||
{ | ||
return 'donat:Donatarias'; | ||
} | ||
|
||
public function getFixedAttributes(): array | ||
{ | ||
return [ | ||
'xmlns:donat' => 'http://www.sat.gob.mx/donat', | ||
'xsi:schemaLocation' => 'http://www.sat.gob.mx/donat' | ||
. ' http://www.sat.gob.mx/sitio_internet/cfd/donat/donat11.xsd', | ||
'version' => '1.1', | ||
]; | ||
} | ||
} |
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,23 @@ | ||
<?php | ||
|
||
namespace CfdiUtils\Elements\Iedu10; | ||
|
||
use CfdiUtils\Elements\Common\AbstractElement; | ||
|
||
class InstEducativas extends AbstractElement | ||
{ | ||
public function getElementName(): string | ||
{ | ||
return 'iedu:InstEducativas'; | ||
} | ||
|
||
public function getFixedAttributes(): array | ||
{ | ||
return [ | ||
'xmlns:iedu' => 'http://www.sat.gob.mx/iedu', | ||
'xsi:schemaLocation' => 'http://www.sat.gob.mx/iedu' | ||
. ' http://www.sat.gob.mx/sitio_internet/cfd/iedu/iedu.xsd', | ||
'version' => '1.0', | ||
]; | ||
} | ||
} |
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,23 @@ | ||
<?php | ||
|
||
namespace CfdiUtils\Elements\Ine11; | ||
|
||
use CfdiUtils\Elements\Common\AbstractElement; | ||
|
||
class Ine extends AbstractElement | ||
{ | ||
public function getElementName(): string | ||
{ | ||
return 'ine:Ine'; | ||
} | ||
|
||
public function getFixedAttributes(): array | ||
{ | ||
return [ | ||
'xmlns:ine' => 'http://www.sat.gob.mx/ine', | ||
'xsi:schemaLocation' => 'http://www.sat.gob.mx/ine' | ||
. ' http://www.sat.gob.mx/sitio_internet/cfd/ine/ine11.xsd', | ||
'Version' => '1.1', | ||
]; | ||
} | ||
} |
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,13 @@ | ||
<?php | ||
|
||
namespace CfdiUtils\Elements\LeyendasFiscales10; | ||
|
||
use CfdiUtils\Elements\Common\AbstractElement; | ||
|
||
class Leyenda extends AbstractElement | ||
{ | ||
public function getElementName(): string | ||
{ | ||
return 'leyendasFisc:Leyenda'; | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
src/CfdiUtils/Elements/LeyendasFiscales10/LeyendasFiscales.php
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 | ||
|
||
namespace CfdiUtils\Elements\LeyendasFiscales10; | ||
|
||
use CfdiUtils\Elements\Common\AbstractElement; | ||
|
||
class LeyendasFiscales extends AbstractElement | ||
{ | ||
public function getElementName(): string | ||
{ | ||
return 'leyendasFisc:LeyendasFiscales'; | ||
} | ||
|
||
public function getFixedAttributes(): array | ||
{ | ||
return [ | ||
'xmlns:leyendasFisc' => 'http://www.sat.gob.mx/leyendasFiscales', | ||
'xsi:schemaLocation' => 'http://www.sat.gob.mx/leyendasFiscales' | ||
. ' http://www.sat.gob.mx/sitio_internet/cfd/leyendasFiscales/leyendasFisc.xsd', | ||
'version' => '1.0', | ||
]; | ||
} | ||
|
||
public function addLeyenda(array $attributes = []): Leyenda | ||
{ | ||
$subject = new Leyenda($attributes); | ||
$this->addChild($subject); | ||
return $subject; | ||
} | ||
|
||
public function multiLeyenda(array ...$elementAttributes): self | ||
{ | ||
foreach ($elementAttributes as $attributes) { | ||
$this->addLeyenda($attributes); | ||
} | ||
return $this; | ||
} | ||
} |
Oops, something went wrong.