diff --git a/composer.json b/composer.json index 687fbf1..90f172c 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ }, "config": { "platform": { - "php": "8.2.16" + "php": "8.2.18" }, "optimize-autoloader": true, "sort-packages": true diff --git a/source/TraitBasic.php b/source/TraitBasic.php index baf0f8f..b741aae 100644 --- a/source/TraitBasic.php +++ b/source/TraitBasic.php @@ -16,7 +16,6 @@ trait TraitBasic { - protected array $arraySettings = []; protected array $arrayProcessing = []; @@ -25,7 +24,7 @@ private function getCommentsFromFileAsArray(): array return $this->getJsonFromFile('config/ElectronicInvoiceComments.json'); } - private function getElements(\SimpleXMLElement|null $arrayIn): array + private function getElements(\SimpleXMLElement | null $arrayIn): array { $arrayToReturn = []; if (!is_null($arrayIn)) { @@ -43,7 +42,7 @@ private function getElements(\SimpleXMLElement|null $arrayIn): array return $arrayToReturn; } - private function getElementSingle(\SimpleXMLElement|null $value) + private function getElementSingle(\SimpleXMLElement | null $value) { $arrayToReturn = []; if (!is_null($value)) { @@ -52,7 +51,9 @@ private function getElementSingle(\SimpleXMLElement|null $value) } else { $arrayToReturn['value'] = $value->__toString(); foreach ($value->attributes() as $keyA => $valueA) { - if (!str_ends_with($valueA, ':CommonAggregateComponents-2') && str_ends_with($valueA, ':CommonBasicComponents-2')) { + if (str_ends_with($valueA, ':CommonAggregateComponents-2')) { + // nothing + } else { $arrayToReturn[$keyA] = $valueA->__toString(); } } @@ -108,7 +109,7 @@ private function getMultipleElementsByKey(\SimpleXMLElement $arrayData): array return $arrayOutput; } - private function getMultipleElementsStandard(array|\SimpleXMLElement $arrayIn): array + private function getMultipleElementsStandard(array | \SimpleXMLElement $arrayIn): array { $arrayToReturn = []; $intLineNo = 0; @@ -121,7 +122,9 @@ private function getMultipleElementsStandard(array|\SimpleXMLElement $arrayIn): } else { $arrayToReturn[$intLineStr][$key2]['value'] = $value2->__toString(); foreach ($value2->attributes() as $keyA => $valueA) { - if (!str_ends_with($valueA, ':CommonAggregateComponents-2') && str_ends_with($valueA, ':CommonBasicComponents-2')) { + if (str_ends_with($valueA, ':CommonAggregateComponents-2')) { + // nothing + } else { $arrayToReturn[$intLineStr][$key2][$keyA] = $valueA->__toString(); } } @@ -139,7 +142,7 @@ private function getProcessingDetails(): void $this->arrayProcessing = $this->getJsonFromFile('config/ElectronicInvoiceProcessingDetails.json'); } - public function getRightMethod(string $existingFunction, $givenParameters = null): array|string + public function getRightMethod(string $existingFunction, $givenParameters = null): array | string { try { if (is_array($givenParameters)) {