Skip to content

Commit f24e1df

Browse files
committedFeb 14, 2025
2 parents c4b8ebb + 36dfc5d commit f24e1df

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed
 

‎composer.json

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
],
2727
"minimum-stability": "stable",
2828
"require": {
29+
"php": "^7.4||^8.1",
30+
"ext-dom": "*",
2931
"php": ">=8.1",
3032
"ext-mbstring": "*",
3133
"ext-dom": "*",

‎example.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,7 @@
219219
->setSignature($signature);// Signature
220220

221221
// Generator Invoice
222-
$generatorXml = new GeneratorInvoice();
223-
$outputXML = $generatorXml->invoice($invoice);
222+
$outputXML = GeneratorInvoice::invoice($invoice)->getXML();
224223
// Load the XML into a DOMDocument
225224
$dom = new DOMDocument('1.0', 'UTF-8');
226225
$dom->preserveWhiteSpace = false;

‎tests/InvoiceTest.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,7 @@ public function testInvoiceXmlGeneration(): void
191191
->setSignature($signature);
192192

193193
// Generate invoice XML
194-
$generatorXml = new GeneratorInvoice();
195-
$outputXML = $generatorXml->invoice($invoice);
194+
$outputXML = GeneratorInvoice::invoice($invoice)->getXML();
196195

197196
// Assert that XML is generated
198197
$this->assertNotEmpty($outputXML, 'XML output should not be empty.');

0 commit comments

Comments
 (0)