From 901c36d671aa58b192460cd801c147921e293101 Mon Sep 17 00:00:00 2001 From: Andrea Pollastri Date: Mon, 13 Nov 2023 17:16:29 +0100 Subject: [PATCH] Revert "CS Fixing..." This reverts commit 8c1612193d38425642b141264060c25d2af571b9. --- .gitignore | 3 +- .php-cs-fixer.php | 44 -------------------- composer.json | 2 +- src/Abstracts/Model.php | 12 ------ src/Contracts/Model.php | 12 ------ src/FatturaElettronica.php | 53 ++++++++++--------------- src/Handlers/Model.php | 22 ++-------- src/Handlers/Xml.php | 32 +++++---------- src/Handlers/XmlDatiBeniServizi.php | 24 ++++------- src/Models/Anagrafica.php | 17 ++------ src/Models/CedentePrestatore.php | 18 +++------ src/Models/CessionarioCommittente.php | 18 +++------ src/Models/DatiAnagrafici.php | 18 ++------- src/Models/DatiBeniServizi.php | 17 ++------ src/Models/DatiGenerali.php | 18 +++------ src/Models/DatiGeneraliDocumento.php | 16 +------- src/Models/DatiPagamento.php | 14 +------ src/Models/DatiRiepilogo.php | 14 +------ src/Models/DatiTrasmissione.php | 16 +------- src/Models/DettaglioLinee.php | 14 +------ src/Models/DettaglioPagamento.php | 12 ------ src/Models/FatturaElettronica.php | 18 +++------ src/Models/FatturaElettronicaBody.php | 19 +++------ src/Models/FatturaElettronicaHeader.php | 17 ++------ src/Models/Id.php | 14 +------ src/Models/Sede.php | 12 ------ src/Settings.php | 12 ------ 27 files changed, 95 insertions(+), 393 deletions(-) delete mode 100644 .php-cs-fixer.php diff --git a/.gitignore b/.gitignore index 5e5f3b0..708b377 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ vendor composer.lock -.phpunit.result.cache -.php-cs-fixer.cache \ No newline at end of file +.phpunit.result.cache \ No newline at end of file diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php deleted file mode 100644 index da272ea..0000000 --- a/.php-cs-fixer.php +++ /dev/null @@ -1,44 +0,0 @@ - -* Dariusz Rumiński -* -* This source file is subject to the MIT license that is bundled -* with this source code in the file LICENSE. -*/ - -$header = <<<'EOF' -This file is part of PHP CS Fixer. - -(c) Fabien Potencier -Dariusz Rumiński - -This source file is subject to the MIT license that is bundled -with this source code in the file LICENSE. -EOF; - -$finder = (new PhpCsFixer\Finder()) - ->ignoreDotFiles(false) - ->ignoreVCSIgnored(true) - ->exclude(['dev-tools/phpstan', 'tests/Fixtures']) - ->in(__DIR__); - -return (new PhpCsFixer\Config()) - ->setRiskyAllowed(true) - ->setRules([ - '@PHP74Migration' => true, - '@PHP74Migration:risky' => true, - '@PHPUnit100Migration:risky' => true, - '@PhpCsFixer' => true, - '@PhpCsFixer:risky' => true, - 'general_phpdoc_annotation_remove' => ['annotations' => ['expectedDeprecation']], // one should use PHPUnit built-in method instead - 'header_comment' => ['header' => $header], - 'modernize_strpos' => true, // needs PHP 8+ or polyfill - 'no_useless_concat_operator' => false, // TODO switch back on when the `src/Console/Application.php` no longer needs the concat - ]) - ->setFinder($finder); diff --git a/composer.json b/composer.json index 2a8cf04..f186ab4 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "symfony/validator": "^6.3" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.38", + "friendsofphp/php-cs-fixer": "^2.19", "phpunit/phpunit": "^9.0" }, "autoload": { diff --git a/src/Abstracts/Model.php b/src/Abstracts/Model.php index 43ed9d3..96c338d 100644 --- a/src/Abstracts/Model.php +++ b/src/Abstracts/Model.php @@ -1,17 +1,5 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica\Abstracts; use Axiostudio\FatturaElettronica\Contracts\Model as ModelInterface; diff --git a/src/Contracts/Model.php b/src/Contracts/Model.php index 840793d..05c548d 100644 --- a/src/Contracts/Model.php +++ b/src/Contracts/Model.php @@ -1,17 +1,5 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica\Contracts; use Symfony\Component\Validator\Mapping\ClassMetadata; diff --git a/src/FatturaElettronica.php b/src/FatturaElettronica.php index f0785d0..a6d6c02 100644 --- a/src/FatturaElettronica.php +++ b/src/FatturaElettronica.php @@ -1,51 +1,25 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica; -use Axiostudio\FatturaElettronica\Handlers\Model as ModelHandler; use Axiostudio\FatturaElettronica\Handlers\Xml as XmlHandler; use Axiostudio\FatturaElettronica\Handlers\XmlDatiBeniServizi as DatiBeniServiziHandler; +use Axiostudio\FatturaElettronica\Handlers\Model as ModelHandler; use Axiostudio\FatturaElettronica\Models\FatturaElettronica as Fattura; class FatturaElettronica { - use DatiBeniServiziHandler; use ModelHandler; use XmlHandler; - - public function compose( - array $FatturaElettronicaHeader, - array $FatturaElettronicaBody, - array $DettaglioLinee, - array $DatiRiepilogo - ): array { - return $this->create( - $FatturaElettronicaHeader, - $FatturaElettronicaBody, - $DettaglioLinee, - $DatiRiepilogo - ); - } + use DatiBeniServiziHandler; protected function fileName($header): string { - $idPaese = (\is_array($header[0][0]) && isset($header[0][0][1])) ? $header[0][0][1] : Settings::IdPaeseDefault(); - $idCodice = (\is_array($header[0][0])) ? $header[0][0][0] : $header[0][0]; + $idPaese = (is_array($header[0][0]) && isset($header[0][0][1])) ? $header[0][0][1] : Settings::IdPaeseDefault(); + $idCodice = (is_array($header[0][0])) ? $header[0][0][0] : $header[0][0]; $progressivoInvio = $header[0][1]; - return $idPaese.$idCodice.'_'.$progressivoInvio.'.xml'; + return $idPaese . $idCodice . '_' . $progressivoInvio . '.xml'; } protected function fileContent($header, $body): string @@ -61,12 +35,27 @@ protected function create( array $DettaglioLinee, array $DatiRiepilogo ): array { + $xmlContent = $this->fileContent($FatturaElettronicaHeader, $FatturaElettronicaBody); $xmlContent = $this->addDatiBeniServiziToXml($xmlContent, $DettaglioLinee, $DatiRiepilogo); return [ 'fileContent' => $xmlContent, - 'fileName' => $this->fileName($FatturaElettronicaHeader), + 'fileName' => $this->fileName($FatturaElettronicaHeader) ]; } + + public function compose( + array $FatturaElettronicaHeader, + array $FatturaElettronicaBody, + array $DettaglioLinee, + array $DatiRiepilogo + ): array { + return $this->create( + $FatturaElettronicaHeader, + $FatturaElettronicaBody, + $DettaglioLinee, + $DatiRiepilogo + ); + } } diff --git a/src/Handlers/Model.php b/src/Handlers/Model.php index bf1b5b1..756925a 100644 --- a/src/Handlers/Model.php +++ b/src/Handlers/Model.php @@ -1,21 +1,9 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica\Handlers; -use Axiostudio\FatturaElettronica\Contracts\Model as ModelInterface; use Symfony\Component\Validator\Validation; +use Axiostudio\FatturaElettronica\Contracts\Model as ModelInterface; trait Model { @@ -23,14 +11,12 @@ public function createModel(ModelInterface $model, bool $toArray = false): array { $validator = Validation::createValidatorBuilder() ->addMethodMapping('loadValidatorMetadata') - ->getValidator() - ; + ->getValidator(); $errors = $validator->validate($model); - if (\count($errors) > 0) { + if (count($errors) > 0) { $errorsString = (string) $errors; - throw new \Exception($errorsString); } @@ -45,4 +31,4 @@ protected function modelToArray(ModelInterface $model): array { return json_decode(json_encode($model), true); } -} +}; diff --git a/src/Handlers/Xml.php b/src/Handlers/Xml.php index f2ceb7b..b634d7a 100644 --- a/src/Handlers/Xml.php +++ b/src/Handlers/Xml.php @@ -1,21 +1,9 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica\Handlers; -use Axiostudio\FatturaElettronica\Settings; use Spatie\ArrayToXml\ArrayToXml; +use Axiostudio\FatturaElettronica\Settings; trait Xml { @@ -26,26 +14,28 @@ public function createXml(array $array): string return $this->updateXml($xml); } - public function createXmlBlock(array $array): string + protected function updateXml(string $xml): string { - $xml = ArrayToXml::convert($array); + $xml = str_replace('', Settings::XmlStart(), $xml); + $xml = str_replace('', '', $xml); + $xml = str_replace('', Settings::XmlEnd(), $xml); - return $this->updateXmlBlock($xml); + return $xml; } - protected function updateXml(string $xml): string + public function createXmlBlock(array $array): string { - $xml = str_replace('', Settings::XmlStart(), $xml); - $xml = str_replace('', '', $xml); + $xml = ArrayToXml::convert($array); - return str_replace('', Settings::XmlEnd(), $xml); + return $this->updateXmlBlock($xml); } protected function updateXmlBlock(string $xml): string { $xml = str_replace('', '', $xml); $xml = str_replace('', '', $xml); + $xml = str_replace('', '', $xml); - return str_replace('', '', $xml); + return $xml; } } diff --git a/src/Handlers/XmlDatiBeniServizi.php b/src/Handlers/XmlDatiBeniServizi.php index 6cd5036..f9e385b 100644 --- a/src/Handlers/XmlDatiBeniServizi.php +++ b/src/Handlers/XmlDatiBeniServizi.php @@ -1,26 +1,16 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica\Handlers; +use Axiostudio\FatturaElettronica\Handlers\Xml; +use Axiostudio\FatturaElettronica\Handlers\Model; use Axiostudio\FatturaElettronica\Models\DatiRiepilogo; use Axiostudio\FatturaElettronica\Models\DettaglioLinee; trait XmlDatiBeniServizi { - use Model; use Xml; + use Model; public function addDatiBeniServiziToXml(string $Xml, array $DettaglioLinee = [], array $DatiRiepilogo = []): string { @@ -29,16 +19,18 @@ public function addDatiBeniServiziToXml(string $Xml, array $DettaglioLinee = [], foreach ($DettaglioLinee as $numero => $linea) { $data = $this->createModel(new DettaglioLinee(...$linea), true); $data['NumeroLinea'] = $numero + 1; - $DettaglioLineeBlock .= ''.$this->createXmlBlock($data).''; + $DettaglioLineeBlock .= '' . $this->createXmlBlock($data) . ''; } $DatiRiepilogoBlock = ''; foreach ($DatiRiepilogo as $dato) { $data = $this->createModel(new DatiRiepilogo(...$dato), true); - $DatiRiepilogoBlock .= ''.$this->createXmlBlock($data).''; + $DatiRiepilogoBlock .= '' . $this->createXmlBlock($data) . ''; } - return str_replace('', $DettaglioLineeBlock.$DatiRiepilogoBlock, $Xml); + $xml = str_replace('', $DettaglioLineeBlock . $DatiRiepilogoBlock, $Xml); + + return $xml; } } diff --git a/src/Models/Anagrafica.php b/src/Models/Anagrafica.php index 4c015ea..59e5853 100644 --- a/src/Models/Anagrafica.php +++ b/src/Models/Anagrafica.php @@ -1,17 +1,5 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica\Models; use Axiostudio\FatturaElettronica\Abstracts\Model; @@ -38,5 +26,8 @@ public function __construct(...$args) } } - public static function loadValidatorMetadata(ClassMetadata $metadata): void {} + public static function loadValidatorMetadata(ClassMetadata $metadata): void + { + // + } } diff --git a/src/Models/CedentePrestatore.php b/src/Models/CedentePrestatore.php index 2a43c53..307d23a 100644 --- a/src/Models/CedentePrestatore.php +++ b/src/Models/CedentePrestatore.php @@ -1,19 +1,8 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica\Models; +use Axiostudio\FatturaElettronica\Models\Sede; use Axiostudio\FatturaElettronica\Abstracts\Model; use Symfony\Component\Validator\Mapping\ClassMetadata; @@ -28,5 +17,8 @@ public function __construct(...$args) $this->Sede = $this->createModel(new Sede(...$args[1])); } - public static function loadValidatorMetadata(ClassMetadata $metadata): void {} + public static function loadValidatorMetadata(ClassMetadata $metadata): void + { + // + } } diff --git a/src/Models/CessionarioCommittente.php b/src/Models/CessionarioCommittente.php index 4154dc8..c2d5d30 100644 --- a/src/Models/CessionarioCommittente.php +++ b/src/Models/CessionarioCommittente.php @@ -1,19 +1,8 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica\Models; +use Axiostudio\FatturaElettronica\Models\Sede; use Axiostudio\FatturaElettronica\Abstracts\Model; use Symfony\Component\Validator\Mapping\ClassMetadata; @@ -28,5 +17,8 @@ public function __construct(...$args) $this->Sede = $this->createModel(new Sede(...$args[1])); } - public static function loadValidatorMetadata(ClassMetadata $metadata): void {} + public static function loadValidatorMetadata(ClassMetadata $metadata): void + { + // + } } diff --git a/src/Models/DatiAnagrafici.php b/src/Models/DatiAnagrafici.php index 17380a8..1854738 100644 --- a/src/Models/DatiAnagrafici.php +++ b/src/Models/DatiAnagrafici.php @@ -1,21 +1,9 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica\Models; -use Axiostudio\FatturaElettronica\Abstracts\Model; use Axiostudio\FatturaElettronica\Settings; +use Axiostudio\FatturaElettronica\Abstracts\Model; use Symfony\Component\Validator\Constraints\Choice; use Symfony\Component\Validator\Constraints\Length; use Symfony\Component\Validator\Mapping\ClassMetadata; @@ -29,11 +17,11 @@ class DatiAnagrafici extends Model public function __construct(...$args) { - $this->IdFiscaleIVA = \is_array($args[0]) ? + $this->IdFiscaleIVA = is_array($args[0]) ? $this->createModel(new Id(...$args[0])) : $this->createModel(new Id($args[0])); - $this->Anagrafica = \is_array($args[1]) ? + $this->Anagrafica = is_array($args[1]) ? $this->createModel(new Anagrafica(...$args[1])) : $this->createModel(new Anagrafica($args[1])); diff --git a/src/Models/DatiBeniServizi.php b/src/Models/DatiBeniServizi.php index 01ea996..d4cf125 100644 --- a/src/Models/DatiBeniServizi.php +++ b/src/Models/DatiBeniServizi.php @@ -1,17 +1,5 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica\Models; use Axiostudio\FatturaElettronica\Abstracts\Model; @@ -27,5 +15,8 @@ public function __construct(...$args) $this->XmlDatiBeniServizi = null; } - public static function loadValidatorMetadata(ClassMetadata $metadata): void {} + public static function loadValidatorMetadata(ClassMetadata $metadata): void + { + // + } } diff --git a/src/Models/DatiGenerali.php b/src/Models/DatiGenerali.php index 1b9f684..0a5a16e 100644 --- a/src/Models/DatiGenerali.php +++ b/src/Models/DatiGenerali.php @@ -1,21 +1,10 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica\Models; use Axiostudio\FatturaElettronica\Abstracts\Model; use Symfony\Component\Validator\Mapping\ClassMetadata; +use Axiostudio\FatturaElettronica\Models\DatiGeneraliDocumento; class DatiGenerali extends Model { @@ -26,5 +15,8 @@ public function __construct(...$args) $this->DatiGeneraliDocumento = $this->createModel(new DatiGeneraliDocumento(...$args[0])); } - public static function loadValidatorMetadata(ClassMetadata $metadata): void {} + public static function loadValidatorMetadata(ClassMetadata $metadata): void + { + // + } } diff --git a/src/Models/DatiGeneraliDocumento.php b/src/Models/DatiGeneraliDocumento.php index a1645df..ec93d0c 100644 --- a/src/Models/DatiGeneraliDocumento.php +++ b/src/Models/DatiGeneraliDocumento.php @@ -1,23 +1,11 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica\Models; -use Axiostudio\FatturaElettronica\Abstracts\Model; use Axiostudio\FatturaElettronica\Settings; -use Symfony\Component\Validator\Constraints\Choice; use Symfony\Component\Validator\Constraints\Date; +use Axiostudio\FatturaElettronica\Abstracts\Model; +use Symfony\Component\Validator\Constraints\Choice; use Symfony\Component\Validator\Constraints\Length; use Symfony\Component\Validator\Mapping\ClassMetadata; diff --git a/src/Models/DatiPagamento.php b/src/Models/DatiPagamento.php index 9c4e543..aaff22c 100644 --- a/src/Models/DatiPagamento.php +++ b/src/Models/DatiPagamento.php @@ -1,21 +1,9 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica\Models; -use Axiostudio\FatturaElettronica\Abstracts\Model; use Axiostudio\FatturaElettronica\Settings; +use Axiostudio\FatturaElettronica\Abstracts\Model; use Symfony\Component\Validator\Constraints\Choice; use Symfony\Component\Validator\Mapping\ClassMetadata; diff --git a/src/Models/DatiRiepilogo.php b/src/Models/DatiRiepilogo.php index 50b5250..010b0d1 100644 --- a/src/Models/DatiRiepilogo.php +++ b/src/Models/DatiRiepilogo.php @@ -1,21 +1,9 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica\Models; -use Axiostudio\FatturaElettronica\Abstracts\Model; use Axiostudio\FatturaElettronica\Settings; +use Axiostudio\FatturaElettronica\Abstracts\Model; use Symfony\Component\Validator\Constraints\Choice; use Symfony\Component\Validator\Mapping\ClassMetadata; diff --git a/src/Models/DatiTrasmissione.php b/src/Models/DatiTrasmissione.php index 582adcf..f087c7e 100644 --- a/src/Models/DatiTrasmissione.php +++ b/src/Models/DatiTrasmissione.php @@ -1,21 +1,9 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica\Models; -use Axiostudio\FatturaElettronica\Abstracts\Model; use Axiostudio\FatturaElettronica\Settings; +use Axiostudio\FatturaElettronica\Abstracts\Model; use Symfony\Component\Validator\Constraints\Choice; use Symfony\Component\Validator\Constraints\Email; use Symfony\Component\Validator\Constraints\Length; @@ -31,7 +19,7 @@ class DatiTrasmissione extends Model public function __construct(...$args) { - $this->IdTrasmittente = \is_array($args[0]) ? + $this->IdTrasmittente = is_array($args[0]) ? $this->createModel(new Id($args[0][0], $args[0][1])) : $this->createModel(new Id($args[0])); diff --git a/src/Models/DettaglioLinee.php b/src/Models/DettaglioLinee.php index 5cedf1b..4f35617 100644 --- a/src/Models/DettaglioLinee.php +++ b/src/Models/DettaglioLinee.php @@ -1,21 +1,9 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica\Models; -use Axiostudio\FatturaElettronica\Abstracts\Model; use Axiostudio\FatturaElettronica\Settings; +use Axiostudio\FatturaElettronica\Abstracts\Model; use Symfony\Component\Validator\Constraints\Choice; use Symfony\Component\Validator\Mapping\ClassMetadata; diff --git a/src/Models/DettaglioPagamento.php b/src/Models/DettaglioPagamento.php index 687418f..d15d788 100644 --- a/src/Models/DettaglioPagamento.php +++ b/src/Models/DettaglioPagamento.php @@ -1,17 +1,5 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica\Models; use Axiostudio\FatturaElettronica\Abstracts\Model; diff --git a/src/Models/FatturaElettronica.php b/src/Models/FatturaElettronica.php index 425b28b..49344fb 100644 --- a/src/Models/FatturaElettronica.php +++ b/src/Models/FatturaElettronica.php @@ -1,21 +1,10 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica\Models; use Axiostudio\FatturaElettronica\Abstracts\Model; use Symfony\Component\Validator\Mapping\ClassMetadata; +use Axiostudio\FatturaElettronica\Models\FatturaElettronicaBody; class FatturaElettronica extends Model { @@ -28,5 +17,8 @@ public function __construct(...$args) $this->FatturaElettronicaBody = $this->createModel(new FatturaElettronicaBody(...$args[1])); } - public static function loadValidatorMetadata(ClassMetadata $metadata): void {} + public static function loadValidatorMetadata(ClassMetadata $metadata): void + { + // + } } diff --git a/src/Models/FatturaElettronicaBody.php b/src/Models/FatturaElettronicaBody.php index 392c83f..f92f939 100644 --- a/src/Models/FatturaElettronicaBody.php +++ b/src/Models/FatturaElettronicaBody.php @@ -1,21 +1,11 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica\Models; use Axiostudio\FatturaElettronica\Abstracts\Model; use Symfony\Component\Validator\Mapping\ClassMetadata; +use Axiostudio\FatturaElettronica\Models\DatiPagamento; +use Axiostudio\FatturaElettronica\Models\DatiBeniServizi; class FatturaElettronicaBody extends Model { @@ -30,5 +20,8 @@ public function __construct(...$args) $this->DatiBeniServizi = $this->createModel(new DatiBeniServizi([])); } - public static function loadValidatorMetadata(ClassMetadata $metadata): void {} + public static function loadValidatorMetadata(ClassMetadata $metadata): void + { + // + } } diff --git a/src/Models/FatturaElettronicaHeader.php b/src/Models/FatturaElettronicaHeader.php index 6d1417d..3473846 100644 --- a/src/Models/FatturaElettronicaHeader.php +++ b/src/Models/FatturaElettronicaHeader.php @@ -1,17 +1,5 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica\Models; use Axiostudio\FatturaElettronica\Abstracts\Model; @@ -30,5 +18,8 @@ public function __construct(...$args) $this->CessionarioCommittente = $this->createModel(new CessionarioCommittente(...$args[2])); } - public static function loadValidatorMetadata(ClassMetadata $metadata): void {} + public static function loadValidatorMetadata(ClassMetadata $metadata): void + { + // + } } diff --git a/src/Models/Id.php b/src/Models/Id.php index cb705dc..4178b67 100644 --- a/src/Models/Id.php +++ b/src/Models/Id.php @@ -1,21 +1,9 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica\Models; -use Axiostudio\FatturaElettronica\Abstracts\Model; use Axiostudio\FatturaElettronica\Settings; +use Axiostudio\FatturaElettronica\Abstracts\Model; use Symfony\Component\Validator\Constraints\Length; use Symfony\Component\Validator\Mapping\ClassMetadata; diff --git a/src/Models/Sede.php b/src/Models/Sede.php index 8b90918..8864d31 100644 --- a/src/Models/Sede.php +++ b/src/Models/Sede.php @@ -1,17 +1,5 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica\Models; use Axiostudio\FatturaElettronica\Abstracts\Model; diff --git a/src/Settings.php b/src/Settings.php index 83f7551..5565d9c 100644 --- a/src/Settings.php +++ b/src/Settings.php @@ -1,17 +1,5 @@ - * Dariusz Rumiński - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - namespace Axiostudio\FatturaElettronica; class Settings