From fb425147e3df9a3fa5333917246974d4663f3ffd Mon Sep 17 00:00:00 2001 From: HorstOeko Date: Fri, 20 Dec 2024 23:05:28 +0100 Subject: [PATCH] [CS] Fixed Checkstyle Issue --- examples/ExampleXmlConverterCiiToUbl.php | 1 - src/XmlConverterCiiToUbl.php | 4 ++-- src/XmlDocumentReader.php | 3 ++- tests/testcases/CiiToUblWithoutTaxTest.php | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/ExampleXmlConverterCiiToUbl.php b/examples/ExampleXmlConverterCiiToUbl.php index f03f90a..5dd9609 100644 --- a/examples/ExampleXmlConverterCiiToUbl.php +++ b/examples/ExampleXmlConverterCiiToUbl.php @@ -1,7 +1,6 @@ getAttribute('currencyID') ); }, - function() use ($invoiceHeaderSettlement) { + function () use ($invoiceHeaderSettlement) { $this->destination->elementWithAttribute( 'cbc:TaxAmount', - 0.0, + '0.0', 'currencyID', $this->source->queryValue('./ram:InvoiceCurrencyCode', $invoiceHeaderSettlement) ); diff --git a/src/XmlDocumentReader.php b/src/XmlDocumentReader.php index f79bcd8..0ff9083 100644 --- a/src/XmlDocumentReader.php +++ b/src/XmlDocumentReader.php @@ -257,7 +257,8 @@ public function whenNotExists(string $expression, ?DOMNode $contextNode, $callba $this->fireCallback( $callbackElse, $this->query($expression, $contextNode)->item(0), - $this->query($expression, $contextNode)->item(0)->parentNode); + $this->query($expression, $contextNode)->item(0)->parentNode + ); } return $this; diff --git a/tests/testcases/CiiToUblWithoutTaxTest.php b/tests/testcases/CiiToUblWithoutTaxTest.php index 26de6cb..9b39138 100644 --- a/tests/testcases/CiiToUblWithoutTaxTest.php +++ b/tests/testcases/CiiToUblWithoutTaxTest.php @@ -129,7 +129,7 @@ public function testDelivery(): void public function testPaymentMeans(): void { $this->assertXPathExists('/ubl:Invoice/cac:PaymentMeans'); - $this->assertXPathValue('/ubl:Invoice/cac:PaymentMeans/cbc:PaymentMeansCode', 58); + $this->assertXPathValue('/ubl:Invoice/cac:PaymentMeans/cbc:PaymentMeansCode', "58"); $this->assertXPathNotExistsWithIndex('/ubl:Invoice/cac:PaymentMeans/cbc:PaymentMeansCode/@name', 0); $this->assertXPathNotExistsWithIndex('/ubl:Invoice/cac:PaymentMeans/cbc:PaymentMeansCode', 1); $this->assertXPathNotExistsWithIndex('/ubl:Invoice/cac:PaymentMeans/cbc:PaymentID', 0); @@ -304,5 +304,4 @@ public function testSaveToFile(): void @unlink($filename); } - }