diff --git a/composer.json b/composer.json index ee0c5eec8..378633807 100644 --- a/composer.json +++ b/composer.json @@ -2,9 +2,10 @@ "require": { "horstoeko/zugferd": "^1.0", "zetacomponents/mail": "^1.10", - "num-num/ubl-invoice": "^1.21", "php-curl-class/php-curl-class": "^12.0", "chillerlan/php-authenticator": "^5.2", - "endroid/qr-code": "^6.0" + "endroid/qr-code": "^6.0", + "smalot/pdfparser": "^2.12", + "atgp/factur-x": "^2.4" } } diff --git a/composer.lock b/composer.lock index 4e866e855..412b4a1b3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,68 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "03e0b831d2d0674eac8b1d9fb8f1a615", + "content-hash": "68f9e79352fa7a801c4e3e4382827005", "packages": [ + { + "name": "atgp/factur-x", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/atgp/factur-x.git", + "reference": "0edbe1e935c3f81dcf3e306b2ce5876bf715bea1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/atgp/factur-x/zipball/0edbe1e935c3f81dcf3e306b2ce5876bf715bea1", + "reference": "0edbe1e935c3f81dcf3e306b2ce5876bf715bea1", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-libxml": "*", + "ext-simplexml": "*", + "ext-zlib": "*", + "php": ">=7.4", + "setasign/fpdf": "^1.8", + "setasign/fpdi": "^2.0", + "smalot/pdfparser": "^0.19.0|~1.0|~2.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~3.1", + "phpstan/phpstan": "^2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Atgp\\FacturX\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "@GP", + "homepage": "https://www.atgp.net/" + } + ], + "description": "PHP library to manage your Factur-X / ZUGFeRD 2.0 PDF invoices files", + "keywords": [ + "ZUGFeRD", + "factur-x", + "invoice", + "pdf", + "php", + "xml" + ], + "support": { + "issues": "https://github.com/atgp/factur-x/issues", + "source": "https://github.com/atgp/factur-x/tree/v2.4.0" + }, + "time": "2025-09-24T13:02:08+00:00" + }, { "name": "bacon/bacon-qr-code", "version": "v3.0.1", @@ -887,78 +947,6 @@ ], "time": "2025-05-26T15:55:41+00:00" }, - { - "name": "num-num/ubl-invoice", - "version": "v1.21.2", - "source": { - "type": "git", - "url": "https://github.com/num-num/ubl-invoice.git", - "reference": "195712b3071e23c5aaa6fe95cb9e2de55c3d1348" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/num-num/ubl-invoice/zipball/195712b3071e23c5aaa6fe95cb9e2de55c3d1348", - "reference": "195712b3071e23c5aaa6fe95cb9e2de55c3d1348", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8.0", - "sabre/xml": "^4.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^9.0", - "squizlabs/php_codesniffer": "^3.7" - }, - "type": "library", - "autoload": { - "psr-4": { - "NumNum\\UBL\\": [ - "src" - ], - "NumNum\\UBL\\Tests\\": [ - "tests" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bert Devriese", - "email": "bert@numnum.be", - "homepage": "https://www.numnum.be", - "role": "Developer" - } - ], - "description": "A modern object-oriented PHP library to create valid UBL and Peppol BIS 3.0 files", - "homepage": "https://github.com/num-num/ubl-invoice", - "keywords": [ - "E-Invoice", - "digital invoice", - "efff", - "einvoice", - "electronic invoice", - "euinvoice", - "invoice", - "peppol", - "peppol bis", - "peppol invoice", - "peppolbis", - "ubl", - "ubl invoice", - "ublinvoice", - "xml", - "xml invoice" - ], - "support": { - "issues": "https://github.com/num-num/ubl-invoice/issues", - "source": "https://github.com/num-num/ubl-invoice/tree/v1.21.2" - }, - "time": "2025-07-01T11:58:25+00:00" - }, { "name": "paragonie/constant_time_encoding", "version": "v3.0.0", @@ -1153,135 +1141,6 @@ }, "time": "2025-07-13T07:04:09+00:00" }, - { - "name": "sabre/uri", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sabre-io/uri.git", - "reference": "38eeab6ed9eec435a2188db489d4649c56272c51" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sabre-io/uri/zipball/38eeab6ed9eec435a2188db489d4649c56272c51", - "reference": "38eeab6ed9eec435a2188db489d4649c56272c51", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.64", - "phpstan/extension-installer": "^1.4", - "phpstan/phpstan": "^1.12", - "phpstan/phpstan-phpunit": "^1.4", - "phpstan/phpstan-strict-rules": "^1.6", - "phpunit/phpunit": "^9.6" - }, - "type": "library", - "autoload": { - "files": [ - "lib/functions.php" - ], - "psr-4": { - "Sabre\\Uri\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Evert Pot", - "email": "me@evertpot.com", - "homepage": "http://evertpot.com/", - "role": "Developer" - } - ], - "description": "Functions for making sense out of URIs.", - "homepage": "http://sabre.io/uri/", - "keywords": [ - "rfc3986", - "uri", - "url" - ], - "support": { - "forum": "https://groups.google.com/group/sabredav-discuss", - "issues": "https://github.com/sabre-io/uri/issues", - "source": "https://github.com/fruux/sabre-uri" - }, - "time": "2024-09-04T15:30:08+00:00" - }, - { - "name": "sabre/xml", - "version": "4.0.6", - "source": { - "type": "git", - "url": "https://github.com/sabre-io/xml.git", - "reference": "a89257fd188ce30e456b841b6915f27905dfdbe3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sabre-io/xml/zipball/a89257fd188ce30e456b841b6915f27905dfdbe3", - "reference": "a89257fd188ce30e456b841b6915f27905dfdbe3", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-xmlreader": "*", - "ext-xmlwriter": "*", - "lib-libxml": ">=2.6.20", - "php": "^7.4 || ^8.0", - "sabre/uri": ">=2.0,<4.0.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.64", - "phpstan/phpstan": "^1.12", - "phpunit/phpunit": "^9.6" - }, - "type": "library", - "autoload": { - "files": [ - "lib/Deserializer/functions.php", - "lib/Serializer/functions.php" - ], - "psr-4": { - "Sabre\\Xml\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Evert Pot", - "email": "me@evertpot.com", - "homepage": "http://evertpot.com/", - "role": "Developer" - }, - { - "name": "Markus Staab", - "email": "markus.staab@redaxo.de", - "role": "Developer" - } - ], - "description": "sabre/xml is an XML library that you may not hate.", - "homepage": "https://sabre.io/xml/", - "keywords": [ - "XMLReader", - "XMLWriter", - "dom", - "xml" - ], - "support": { - "forum": "https://groups.google.com/group/sabredav-discuss", - "issues": "https://github.com/sabre-io/xml/issues", - "source": "https://github.com/fruux/sabre-xml" - }, - "time": "2024-09-06T08:00:55+00:00" - }, { "name": "setasign/fpdf", "version": "1.8.6", @@ -1402,16 +1261,16 @@ }, { "name": "smalot/pdfparser", - "version": "v2.12.0", + "version": "v2.12.1", "source": { "type": "git", "url": "https://github.com/smalot/pdfparser.git", - "reference": "8440edbf58c8596074e78ada38dcb0bd041a5948" + "reference": "98d31ba34ef5b5a98897ef4b6c3925d502ea53b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/smalot/pdfparser/zipball/8440edbf58c8596074e78ada38dcb0bd041a5948", - "reference": "8440edbf58c8596074e78ada38dcb0bd041a5948", + "url": "https://api.github.com/repos/smalot/pdfparser/zipball/98d31ba34ef5b5a98897ef4b6c3925d502ea53b1", + "reference": "98d31ba34ef5b5a98897ef4b6c3925d502ea53b1", "shasum": "" }, "require": { @@ -1447,9 +1306,9 @@ ], "support": { "issues": "https://github.com/smalot/pdfparser/issues", - "source": "https://github.com/smalot/pdfparser/tree/v2.12.0" + "source": "https://github.com/smalot/pdfparser/tree/v2.12.1" }, - "time": "2025-03-31T13:16:09+00:00" + "time": "2025-07-31T06:19:56+00:00" }, { "name": "symfony/deprecation-contracts", diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 3d1a40890..a78ff4100 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -9,8 +9,5 @@ return array( '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', - '383eaff206634a77a1be54e64e6459c7' => $vendorDir . '/sabre/uri/lib/functions.php', '662a729f963d39afe703c9d9b7ab4a8c' => $vendorDir . '/symfony/polyfill-php83/bootstrap.php', - '3569eecfeed3bcf0bad3c998a494ecb8' => $vendorDir . '/sabre/xml/lib/Deserializer/functions.php', - '93aa591bc4ca510c520999e34229ee79' => $vendorDir . '/sabre/xml/lib/Serializer/functions.php', ); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index dd4792858..5f357af1a 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -20,12 +20,8 @@ return array( 'Symfony\\Component\\Validator\\' => array($vendorDir . '/symfony/validator'), 'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'), 'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'), - 'Sabre\\Xml\\' => array($vendorDir . '/sabre/xml/lib'), - 'Sabre\\Uri\\' => array($vendorDir . '/sabre/uri/lib'), 'ParagonIE\\ConstantTime\\' => array($vendorDir . '/paragonie/constant_time_encoding/src'), 'PHPStan\\PhpDocParser\\' => array($vendorDir . '/phpstan/phpdoc-parser/src'), - 'NumNum\\UBL\\Tests\\' => array($vendorDir . '/num-num/ubl-invoice/tests'), - 'NumNum\\UBL\\' => array($vendorDir . '/num-num/ubl-invoice/src'), 'Metadata\\' => array($vendorDir . '/jms/metadata/src'), 'JMS\\Serializer\\' => array($vendorDir . '/jms/serializer/src'), 'GoetasWebservices\\Xsd\\XsdToPhpRuntime\\' => array($vendorDir . '/goetas-webservices/xsd2php-runtime/src'), @@ -35,4 +31,5 @@ return array( 'DASPRiD\\Enum\\' => array($vendorDir . '/dasprid/enum/src'), 'Curl\\' => array($vendorDir . '/php-curl-class/php-curl-class/src/Curl'), 'BaconQrCode\\' => array($vendorDir . '/bacon/bacon-qr-code/src'), + 'Atgp\\FacturX\\' => array($vendorDir . '/atgp/factur-x/src'), ); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 6d5170bf7..670f6fae3 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -10,10 +10,7 @@ class ComposerStaticInit1a0e4ea3fb1d108a445b9e95a7c251ad '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', - '383eaff206634a77a1be54e64e6459c7' => __DIR__ . '/..' . '/sabre/uri/lib/functions.php', '662a729f963d39afe703c9d9b7ab4a8c' => __DIR__ . '/..' . '/symfony/polyfill-php83/bootstrap.php', - '3569eecfeed3bcf0bad3c998a494ecb8' => __DIR__ . '/..' . '/sabre/xml/lib/Deserializer/functions.php', - '93aa591bc4ca510c520999e34229ee79' => __DIR__ . '/..' . '/sabre/xml/lib/Serializer/functions.php', ); public static $prefixLengthsPsr4 = array ( @@ -42,19 +39,12 @@ class ComposerStaticInit1a0e4ea3fb1d108a445b9e95a7c251ad 'Symfony\\Component\\Validator\\' => 28, 'Symfony\\Component\\Process\\' => 26, 'Symfony\\Component\\Finder\\' => 25, - 'Sabre\\Xml\\' => 10, - 'Sabre\\Uri\\' => 10, ), 'P' => array ( 'ParagonIE\\ConstantTime\\' => 23, 'PHPStan\\PhpDocParser\\' => 21, ), - 'N' => - array ( - 'NumNum\\UBL\\Tests\\' => 17, - 'NumNum\\UBL\\' => 11, - ), 'M' => array ( 'Metadata\\' => 9, @@ -85,6 +75,10 @@ class ComposerStaticInit1a0e4ea3fb1d108a445b9e95a7c251ad array ( 'BaconQrCode\\' => 12, ), + 'A' => + array ( + 'Atgp\\FacturX\\' => 13, + ), ); public static $prefixDirsPsr4 = array ( @@ -144,14 +138,6 @@ class ComposerStaticInit1a0e4ea3fb1d108a445b9e95a7c251ad array ( 0 => __DIR__ . '/..' . '/symfony/finder', ), - 'Sabre\\Xml\\' => - array ( - 0 => __DIR__ . '/..' . '/sabre/xml/lib', - ), - 'Sabre\\Uri\\' => - array ( - 0 => __DIR__ . '/..' . '/sabre/uri/lib', - ), 'ParagonIE\\ConstantTime\\' => array ( 0 => __DIR__ . '/..' . '/paragonie/constant_time_encoding/src', @@ -160,14 +146,6 @@ class ComposerStaticInit1a0e4ea3fb1d108a445b9e95a7c251ad array ( 0 => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src', ), - 'NumNum\\UBL\\Tests\\' => - array ( - 0 => __DIR__ . '/..' . '/num-num/ubl-invoice/tests', - ), - 'NumNum\\UBL\\' => - array ( - 0 => __DIR__ . '/..' . '/num-num/ubl-invoice/src', - ), 'Metadata\\' => array ( 0 => __DIR__ . '/..' . '/jms/metadata/src', @@ -204,6 +182,10 @@ class ComposerStaticInit1a0e4ea3fb1d108a445b9e95a7c251ad array ( 0 => __DIR__ . '/..' . '/bacon/bacon-qr-code/src', ), + 'Atgp\\FacturX\\' => + array ( + 0 => __DIR__ . '/..' . '/atgp/factur-x/src', + ), ); public static $prefixesPsr0 = array ( diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index eef81dec9..b7ef27d7c 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1,5 +1,68 @@ { "packages": [ + { + "name": "atgp/factur-x", + "version": "v2.4.0", + "version_normalized": "2.4.0.0", + "source": { + "type": "git", + "url": "https://github.com/atgp/factur-x.git", + "reference": "0edbe1e935c3f81dcf3e306b2ce5876bf715bea1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/atgp/factur-x/zipball/0edbe1e935c3f81dcf3e306b2ce5876bf715bea1", + "reference": "0edbe1e935c3f81dcf3e306b2ce5876bf715bea1", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-libxml": "*", + "ext-simplexml": "*", + "ext-zlib": "*", + "php": ">=7.4", + "setasign/fpdf": "^1.8", + "setasign/fpdi": "^2.0", + "smalot/pdfparser": "^0.19.0|~1.0|~2.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~3.1", + "phpstan/phpstan": "^2.0" + }, + "time": "2025-09-24T13:02:08+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Atgp\\FacturX\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "@GP", + "homepage": "https://www.atgp.net/" + } + ], + "description": "PHP library to manage your Factur-X / ZUGFeRD 2.0 PDF invoices files", + "keywords": [ + "ZUGFeRD", + "factur-x", + "invoice", + "pdf", + "php", + "xml" + ], + "support": { + "issues": "https://github.com/atgp/factur-x/issues", + "source": "https://github.com/atgp/factur-x/tree/v2.4.0" + }, + "install-path": "../atgp/factur-x" + }, { "name": "bacon/bacon-qr-code", "version": "v3.0.1", @@ -920,81 +983,6 @@ ], "install-path": "../jms/serializer" }, - { - "name": "num-num/ubl-invoice", - "version": "v1.21.2", - "version_normalized": "1.21.2.0", - "source": { - "type": "git", - "url": "https://github.com/num-num/ubl-invoice.git", - "reference": "195712b3071e23c5aaa6fe95cb9e2de55c3d1348" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/num-num/ubl-invoice/zipball/195712b3071e23c5aaa6fe95cb9e2de55c3d1348", - "reference": "195712b3071e23c5aaa6fe95cb9e2de55c3d1348", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8.0", - "sabre/xml": "^4.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^9.0", - "squizlabs/php_codesniffer": "^3.7" - }, - "time": "2025-07-01T11:58:25+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "NumNum\\UBL\\": [ - "src" - ], - "NumNum\\UBL\\Tests\\": [ - "tests" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bert Devriese", - "email": "bert@numnum.be", - "homepage": "https://www.numnum.be", - "role": "Developer" - } - ], - "description": "A modern object-oriented PHP library to create valid UBL and Peppol BIS 3.0 files", - "homepage": "https://github.com/num-num/ubl-invoice", - "keywords": [ - "E-Invoice", - "digital invoice", - "efff", - "einvoice", - "electronic invoice", - "euinvoice", - "invoice", - "peppol", - "peppol bis", - "peppol invoice", - "peppolbis", - "ubl", - "ubl invoice", - "ublinvoice", - "xml", - "xml invoice" - ], - "support": { - "issues": "https://github.com/num-num/ubl-invoice/issues", - "source": "https://github.com/num-num/ubl-invoice/tree/v1.21.2" - }, - "install-path": "../num-num/ubl-invoice" - }, { "name": "paragonie/constant_time_encoding", "version": "v3.0.0", @@ -1198,141 +1186,6 @@ }, "install-path": "../phpstan/phpdoc-parser" }, - { - "name": "sabre/uri", - "version": "3.0.2", - "version_normalized": "3.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/sabre-io/uri.git", - "reference": "38eeab6ed9eec435a2188db489d4649c56272c51" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sabre-io/uri/zipball/38eeab6ed9eec435a2188db489d4649c56272c51", - "reference": "38eeab6ed9eec435a2188db489d4649c56272c51", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.64", - "phpstan/extension-installer": "^1.4", - "phpstan/phpstan": "^1.12", - "phpstan/phpstan-phpunit": "^1.4", - "phpstan/phpstan-strict-rules": "^1.6", - "phpunit/phpunit": "^9.6" - }, - "time": "2024-09-04T15:30:08+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "lib/functions.php" - ], - "psr-4": { - "Sabre\\Uri\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Evert Pot", - "email": "me@evertpot.com", - "homepage": "http://evertpot.com/", - "role": "Developer" - } - ], - "description": "Functions for making sense out of URIs.", - "homepage": "http://sabre.io/uri/", - "keywords": [ - "rfc3986", - "uri", - "url" - ], - "support": { - "forum": "https://groups.google.com/group/sabredav-discuss", - "issues": "https://github.com/sabre-io/uri/issues", - "source": "https://github.com/fruux/sabre-uri" - }, - "install-path": "../sabre/uri" - }, - { - "name": "sabre/xml", - "version": "4.0.6", - "version_normalized": "4.0.6.0", - "source": { - "type": "git", - "url": "https://github.com/sabre-io/xml.git", - "reference": "a89257fd188ce30e456b841b6915f27905dfdbe3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sabre-io/xml/zipball/a89257fd188ce30e456b841b6915f27905dfdbe3", - "reference": "a89257fd188ce30e456b841b6915f27905dfdbe3", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-xmlreader": "*", - "ext-xmlwriter": "*", - "lib-libxml": ">=2.6.20", - "php": "^7.4 || ^8.0", - "sabre/uri": ">=2.0,<4.0.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.64", - "phpstan/phpstan": "^1.12", - "phpunit/phpunit": "^9.6" - }, - "time": "2024-09-06T08:00:55+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "lib/Deserializer/functions.php", - "lib/Serializer/functions.php" - ], - "psr-4": { - "Sabre\\Xml\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Evert Pot", - "email": "me@evertpot.com", - "homepage": "http://evertpot.com/", - "role": "Developer" - }, - { - "name": "Markus Staab", - "email": "markus.staab@redaxo.de", - "role": "Developer" - } - ], - "description": "sabre/xml is an XML library that you may not hate.", - "homepage": "https://sabre.io/xml/", - "keywords": [ - "XMLReader", - "XMLWriter", - "dom", - "xml" - ], - "support": { - "forum": "https://groups.google.com/group/sabredav-discuss", - "issues": "https://github.com/sabre-io/xml/issues", - "source": "https://github.com/fruux/sabre-xml" - }, - "install-path": "../sabre/xml" - }, { "name": "setasign/fpdf", "version": "1.8.6", @@ -1459,17 +1312,17 @@ }, { "name": "smalot/pdfparser", - "version": "v2.12.0", - "version_normalized": "2.12.0.0", + "version": "v2.12.1", + "version_normalized": "2.12.1.0", "source": { "type": "git", "url": "https://github.com/smalot/pdfparser.git", - "reference": "8440edbf58c8596074e78ada38dcb0bd041a5948" + "reference": "98d31ba34ef5b5a98897ef4b6c3925d502ea53b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/smalot/pdfparser/zipball/8440edbf58c8596074e78ada38dcb0bd041a5948", - "reference": "8440edbf58c8596074e78ada38dcb0bd041a5948", + "url": "https://api.github.com/repos/smalot/pdfparser/zipball/98d31ba34ef5b5a98897ef4b6c3925d502ea53b1", + "reference": "98d31ba34ef5b5a98897ef4b6c3925d502ea53b1", "shasum": "" }, "require": { @@ -1478,7 +1331,7 @@ "php": ">=7.1", "symfony/polyfill-mbstring": "^1.18" }, - "time": "2025-03-31T13:16:09+00:00", + "time": "2025-07-31T06:19:56+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -1507,7 +1360,7 @@ ], "support": { "issues": "https://github.com/smalot/pdfparser/issues", - "source": "https://github.com/smalot/pdfparser/tree/v2.12.0" + "source": "https://github.com/smalot/pdfparser/tree/v2.12.1" }, "install-path": "../smalot/pdfparser" }, diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 260aa5258..e17da84d7 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => '__root__', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '9584a3090ab8e976441fa6e8ab7798db0a361830', + 'reference' => '86019118eddd8ca179d77922326c82bf3507b3cf', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -13,12 +13,21 @@ '__root__' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '9584a3090ab8e976441fa6e8ab7798db0a361830', + 'reference' => '86019118eddd8ca179d77922326c82bf3507b3cf', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false, ), + 'atgp/factur-x' => array( + 'pretty_version' => 'v2.4.0', + 'version' => '2.4.0.0', + 'reference' => '0edbe1e935c3f81dcf3e306b2ce5876bf715bea1', + 'type' => 'library', + 'install_path' => __DIR__ . '/../atgp/factur-x', + 'aliases' => array(), + 'dev_requirement' => false, + ), 'bacon/bacon-qr-code' => array( 'pretty_version' => 'v3.0.1', 'version' => '3.0.1.0', @@ -136,15 +145,6 @@ 'aliases' => array(), 'dev_requirement' => false, ), - 'num-num/ubl-invoice' => array( - 'pretty_version' => 'v1.21.2', - 'version' => '1.21.2.0', - 'reference' => '195712b3071e23c5aaa6fe95cb9e2de55c3d1348', - 'type' => 'library', - 'install_path' => __DIR__ . '/../num-num/ubl-invoice', - 'aliases' => array(), - 'dev_requirement' => false, - ), 'paragonie/constant_time_encoding' => array( 'pretty_version' => 'v3.0.0', 'version' => '3.0.0.0', @@ -172,24 +172,6 @@ 'aliases' => array(), 'dev_requirement' => false, ), - 'sabre/uri' => array( - 'pretty_version' => '3.0.2', - 'version' => '3.0.2.0', - 'reference' => '38eeab6ed9eec435a2188db489d4649c56272c51', - 'type' => 'library', - 'install_path' => __DIR__ . '/../sabre/uri', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'sabre/xml' => array( - 'pretty_version' => '4.0.6', - 'version' => '4.0.6.0', - 'reference' => 'a89257fd188ce30e456b841b6915f27905dfdbe3', - 'type' => 'library', - 'install_path' => __DIR__ . '/../sabre/xml', - 'aliases' => array(), - 'dev_requirement' => false, - ), 'setasign/fpdf' => array( 'pretty_version' => '1.8.6', 'version' => '1.8.6.0', @@ -209,9 +191,9 @@ 'dev_requirement' => false, ), 'smalot/pdfparser' => array( - 'pretty_version' => 'v2.12.0', - 'version' => '2.12.0.0', - 'reference' => '8440edbf58c8596074e78ada38dcb0bd041a5948', + 'pretty_version' => 'v2.12.1', + 'version' => '2.12.1.0', + 'reference' => '98d31ba34ef5b5a98897ef4b6c3925d502ea53b1', 'type' => 'library', 'install_path' => __DIR__ . '/../smalot/pdfparser', 'aliases' => array(), diff --git a/vendor/num-num/ubl-invoice/.editorconfig b/vendor/num-num/ubl-invoice/.editorconfig deleted file mode 100644 index cd8eb86ef..000000000 --- a/vendor/num-num/ubl-invoice/.editorconfig +++ /dev/null @@ -1,15 +0,0 @@ -; This file is for unifying the coding style for different editors and IDEs. -; More information at http://editorconfig.org - -root = true - -[*] -charset = utf-8 -indent_size = 4 -indent_style = space -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true - -[*.md] -trim_trailing_whitespace = false diff --git a/vendor/num-num/ubl-invoice/.gitignore b/vendor/num-num/ubl-invoice/.gitignore deleted file mode 100644 index 826964e0e..000000000 --- a/vendor/num-num/ubl-invoice/.gitignore +++ /dev/null @@ -1,83 +0,0 @@ -## Composer -.idea -composer.phar -/vendor/ - - -## Linux -# temporary files which can be created if a process still has a handle open of a deleted file -.fuse_hidden* - -# KDE directory preferences -.directory - -# Linux trash folder which might appear on any partition or disk -.Trash-* - -# .nfs files are created when an open file is removed but is still being accessed -.nfs* - - -## macOS -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - - -## Windows -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# Generated XML files from tests -/tests/*.xml - -# Test cache -.phpunit.result.cache - -# Editors -.vscode/ diff --git a/vendor/num-num/ubl-invoice/CHANGELOG.md b/vendor/num-num/ubl-invoice/CHANGELOG.md deleted file mode 100644 index 10a3731f2..000000000 --- a/vendor/num-num/ubl-invoice/CHANGELOG.md +++ /dev/null @@ -1,261 +0,0 @@ -# Changelog for v1.21.2 - -#### Bug fixes - -- in AllowanceCharge should not crash when the system uses localized number output -- documentTypeCode in AdditionalDocumentReference should not be limited to int values - Thanks [@tgeorgel](https://github.com/tgeorgel) - -# Changelog for v1.21.1 - -#### Bug fixes - -- should not be rounded to zero decimals - -# Changelog for v1.21.0 - -### New features & improvements - -- Add missing ICD Code list. See also https://docs.peppol.eu/poacc/billing/3.0/codelist/ICD/ -- Make optional - Thanks [@chipco](https://github.com/chipco) -- Add to - Thanks [@tgeorgel](https://github.com/tgeorgel) -- Add to - Thanks [@tgeorgel](https://github.com/tgeorgel) -- Allow both and to be present in - Thanks [@tgeorgel](https://github.com/tgeorgel) - -# Changelog for v1.20.0 - -### New features & improvements - -- General change: don't round numbers to two decimals, always use the amount of provided decimals - -# Changelog for v1.19.1 - -### New features & improvements - -- Add `` to `` - Thanks [@ronaldsgailis](https://github.com/ronaldsgailis) - -# Changelog for v1.19.0 - -### New features & improvements - -- Add `` to `` -- -# Changelog for v1.18.2 - -### New features & improvements - -- Add `` to `` - -#### Bug fixes - -- Fix Amount, BaseAmount, TaxCategory tag sort in `` -- Fix parameter type for `` on `` to array - -# Changelog for v1.18.1 - -#### Bug fixes - -- Fix Creditnote `` validation issues, this tag should be optional - -# Changelog for 1.18.0 - -### New features & improvements - -- Support for `` `` --> `cbc:IDPeppol` Scheme identifier - Thanks [@dragonfly4](https://github.com/dragonfly4) -- Support to add `` content without having to use an external file ref but by adding it as a fileStream/fileContents - Thanks [@dietercoopman](https://github.com/dietercoopman), [@bagulho](https://github.com/bagulho) -- Add `` to `` - Thanks [@vsadrn](https://github.com/vsadrn) -- Improved `UNCL4461` support for `` - Thanks [@TSimkus](https://github.com/TSimkus), [@TecsiAron](https://github.com/TecsiAron) -- Add `` support for `` - Thanks [@TSimkus](https://github.com/TSimkus) -- Add `` to `` - Thanks [@TSimkus](https://github.com/TSimkus) -- Add support for `` in Creditnotes - Thanks [@UlusoftConsultancy](https://github.com/UlusoftConsultancy) -- Add `` to `` - Thanks [@Quazz](https://github.com/Quazz) -- Add support for TaxExemptionReason and TaxExemptionReasonCode to `` - Thanks [@bagulho](https://github.com/bagulho) - -### Breaking changes - -- Add support to include multiple `PaymentMeans` - Thanks [@Quazz](https://github.com/Quazz) - -#### Bug fixes - -- Fix `InvoiceTypeCode` documentation dead link - Thanks [@TSimkus](https://github.com/TSimkus) -- Changed `` type from `int` to `float` - Thanks [@TSimkus](https://github.com/TSimkus) - -# Changelog for version 1.17.0 - -### New features & improvements - -- Add list of `VatExemptionCode` options - -# Changelog for version 1.16.0 - -### New features & improvements - -- Add `` to `` -- Add `` to `` - -# Changelog for version 1.15.5 - -### New features & improvements - -- Don't output an InvoiceLine `` when no `` was set -- Don't output `` under InvoiceLine unless explicitely set - -# Changelog for version v1.15.4 - -### New features & improvements - -- Added UNCL5305 codes to be used in various implementations -- Improved default result for UNCL5305 code in `TaxCategory->getId()` if `TaxCategory->setId()` was not used - -# Changelog for version v1.15.3 - -### New features & improvements - -- Added more EAS codes to be used in various implementations - -# Changelog for version v1.15.2 - -### New features & improvements - -- Added `EASCode` list with additional EAS codes to be used in various implementations - -# Changelog for version v1.15.1 - -### New features & improvements - -- Add `PrepaidAmount` to `LegalMonetaryTotal` -- Add `IssueDate` to `OrderReference` -- Add `ICDCode` list to be used in various other places -- Fixed LegalMonetaryTotal which contained a syntax error - -# Changelog for version v1.15 - -### New features & improvements - -- Added the possibility to use `AdditionalDocumentReference` without `Attachment` - Thanks [@pjcarly](https://github.com/pjcarly) -- Added `DocumentTypeCode` on `AdditionalDocumentReference` -- Added setter/getter `InvoicePeriod` `DescriptionCode` (VAT date code UNCL2005 subset) - Thanks [@markovic131](https://github.com/markovic131) -- Added `PartyIdentificationSchemeName` to `Party` - Thanks [@tgeorgel](https://github.com/tgeorgel) -- Added deprecation warning for setAdditionalDocumentReference -- Fixed `ContractDocumentReference` XML position - Thanks [@markovic131](https://github.com/markovic131) -- Fixed `Name` position in `TaxScheme` - Thanks [@tgeorgel](https://github.com/tgeorgel) -- Fixed `InvoicePeriod`, `OrderReference`, `ContractDocumentReference` sorting -- Fixed DocumentType which is not a CommonAggregateComponent - Thanks [@christopheg](https://github.com/christopheg) - -# Changelog for version 1.14 - -### New features & improvements - -- Add support for the `CreditNote` root tag and `CreditNoteLine` tags - Thanks [@JorisDebonnet](https://github.com/JorisDebonnet) -- Added `DocumentDescription` in `AdditionalDocumentReference` - Thanks [@JorisDebonnet](https://github.com/JorisDebonnet) -- Added `ExternalReference` (`URI`) as an alternative for an `EmbeddedDocumentBinaryObject` in `Attachment` - Thanks [@JorisDebonnet](https://github.com/JorisDebonnet) -- Fixed the appearing order of `Name` and `Percent` in `ClassifiedTaxCategory` - Thanks [@JorisDebonnet](https://github.com/JorisDebonnet) -- Added `ProfileID` to `Invoice` - Thanks [@JorisDebonnet](https://github.com/JorisDebonnet) -- Added support for multiple `AdditionalDocumentReference` children to `Invoice` - Thanks [@JorisDebonnet](https://github.com/JorisDebonnet) -- Made `Description` optional in `Item` - Thanks [@JorisDebonnet](https://github.com/JorisDebonnet) -- Added `EndpointID` to `Party` - Thanks [@JorisDebonnet](https://github.com/JorisDebonnet) -- Made `PartyName` optional in `Party` - Thanks [@JorisDebonnet](https://github.com/JorisDebonnet) -- Added PHP 8 support in `composer.json` - Thanks [@antal-levente](https://github.com/antal-levente) -- Added `Address->CountrySubentity()` - Thanks [@antal-levente](https://github.com/antal-levente) -- Fixed `xmlSerialize()` compatibility warnings - Thanks [@antal-levente](https://github.com/antal-levente) -- Fixed number_format null values warning - Thanks [@antal-levente](https://github.com/antal-levente) -- Add support for `cac:PartyIdentification` `schemeId` attribute -- Add support for `cac:AllowanceCharge` in `Price` tag - -### Breaking changes - -- Changed `InvoiceLine`'s default `UnitCode` from `'MON'` to `UnitCode::UNIT` (in order to match `Price`'s default UnitCode) - Thanks [@JorisDebonnet](https://github.com/JorisDebonnet) - -### Breaking changes - -- Changed `InvoiceLine`'s default `UnitCode` from `'MON'` to `UnitCode::UNIT` (in order to match `Price`'s default UnitCode) - Thanks [@JorisDebonnet](https://github.com/JorisDebonnet) - -# Changelog for version 1.13 - -### New features & improvements - -- Add `` child node for `` - -# Changelog for version 1.12 - -### New features & improvements - -- PHP8 Support — Thanks [@ChristianVermeulen](https://github.com/ChristianVermeulen) - -# Changelog for version 1.11 - -### New features & improvements - -- Added new ContractDocumentReference class & tag `` to Invoice — Thanks [@mabjavaid](https://github.com/mabjavaid) -- Remove duplicate validation for `id` on invoice — Thanks [@mabjavaid](https://github.com/mabjavaid) -- Added new cac:PartyIdentification tag to cac:Party - -# Changelog for version 1.10.2 - -### New features & improvements - -- Added AdditionalStreetName in Address.php — Thanks [@jbputit](https://github.com/jbputit) - -# Changelog for version 1.10.1 - -### New features & improvements - -- Added year, month and piece as additional units in UnitCode.php — Thanks [@jbputit](https://github.com/jbputit) -- Added possibility to set InvoicePeriod in InvoiceLine — Thanks [@jbputit](https://github.com/jbputit) - -# Changelog for version 1.10 - -### New features & improvements - -- Added new OrderReferen class & tag `` to Invoice — Thanks [@jbputit](https://github.com/jbputit) - -# Changelog for version 1.9.6 - -### New features & improvements - -- Support for `` in `` — Thanks [@eborned](https://github.com/eborned) - -# Changelog for version 1.9.5 - -### New features & improvements - -- Add `` child node for `` — Thanks [@eborned](https://github.com/eborned) - -# Changelog for version 1.9.4 - -### New features & improvements - -- Bugfix: Fix order of `` node in `` - -# Changelog for version 1.9.3 - -### New features & improvements - -- Bugfix: Use correct number formatting when `` in `` contains a float value -- Bugfix: Use correct number formatting when `` in `` contains a float value -- Bugfix: Use correct number formatting when `` in `` contains a float value - -# Changelog for version 1.9.2 - -### New features & improvements - -- Add `` to `` for non structured payment instructions - -# Changelog for version 1.9.1 - -### New features & improvements - -- Bugfix in ``, set correct order for child nodes `` & `` — Thanks [@stedekay](https://github.com/stedekay) - -# Changelog for version 1.9 - -### New features & improvements - -- Added return type declarations in every class -- Added `PartyTaxScheme` -- Added `Party->setPartyTaxScheme()` - -### Breaking changes - -- `Party->setTaxCompanyName(string)` has been removed since `PartyTaxScheme` has been added -- `Party->setTaxCompanyId(string)` has been removed since `PartyTaxScheme` has been added -- `Party->setTaxScheme(string)` has been removed since `PartyTaxScheme` has been added diff --git a/vendor/num-num/ubl-invoice/CONTRIBUTING.md b/vendor/num-num/ubl-invoice/CONTRIBUTING.md deleted file mode 100644 index 386157063..000000000 --- a/vendor/num-num/ubl-invoice/CONTRIBUTING.md +++ /dev/null @@ -1,60 +0,0 @@ -# Contributing to ubl-invoice - -Are you missing a feature and would you like to add it to the library? Great! Any contributions to this library are welcome. We try to be responsive and release new, non-breaking features as fast as possible. - -## Reporting issues - -This package uses the [GitHub issue tracker](https://github.com/num-num/ubl-invoice/issues) to track bugs and features. Before submitting a bug report or feature request, check to make sure it hasn't already been submitted. - -## Contributing code - -If you want to add additional tags, attributes or functionality to the library, please feel free to create a [pull request](https://github.com/num-num/ubl-invoice/pulls) with your changes. - -Please try to follow this workflow: - -- Fork the project -- Create a new branch forked from the master branch with a title for your feature (e.g. feature-that-i-want) -- Commit all your code into this branch until you are happy with your contribution -- Document your changes in the **changelog/next-release.md** file ⚠️ -- If possible; try to add unit tests for your contribution -- Create a pull request with your commits - -## Formatting ⚠️ - -Please try to follow [PSR-12](https://www.php-fig.org/psr/psr-12/) rules when writing code. A PSR-12 compliant [phpcs.xml](phpcs.xml) is provided, so if your editor supports [phpcs](https://github.com/squizlabs/PHP_CodeSniffer), your editor should automatically warn you if you are deviating from PSR-12 compliant formatting. - -You can also check code style manually by running `composer phpcs` in the projects' root folder on your disk. - -```zsh -$ cd ubl-invoice -$ composer phpcs -``` - -The project also has PHPStan integrated for code checking, which can be triggered with: - -```zsh -$ cd ubl-invoice -$ composer phpstan -``` - -## Unit testing ⚠️ - -### A note on unit testing - -Although unit testing is included, this repository does not provide exhaustive unit testing for *all* possibilities the library offers. This is definitely a long-term goal. So please try to add unit tests for new functionality that you add. - -### Running the unit tests - -To run the complete suite of unit tests - -```zsh -$ cd ubl-invoice -$ composer test -``` - -To run a single unit test - -```zsh -$ cd ubl-invoice -$ composer test tests/SimpleInvoiceTest.php -``` diff --git a/vendor/num-num/ubl-invoice/LICENSE b/vendor/num-num/ubl-invoice/LICENSE deleted file mode 100644 index 1b2b043d4..000000000 --- a/vendor/num-num/ubl-invoice/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2018 Num•Num - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/num-num/ubl-invoice/README.md b/vendor/num-num/ubl-invoice/README.md deleted file mode 100644 index 180bfd561..000000000 --- a/vendor/num-num/ubl-invoice/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# UBL-Invoice - -A modern object-oriented PHP library to create valid UBL and Peppol BIS 3.0 files. Please feel free to [contribute](https://github.com/num-num/ubl-invoice/pulls) if you are missing features or tags. - -[![Latest Version on Packagist](https://img.shields.io/packagist/v/num-num/ubl-invoice.svg?style=rounded-square)](https://packagist.org/packages/num-num/ubl-invoice) -[![Total Downloads](https://img.shields.io/packagist/dt/num-num/ubl-invoice.svg?style=rounded-square)](https://packagist.org/packages/num-num/ubl-invoice) - -![Num•Num UBL Invoice](https://i.imgur.com/JPyFBYQ.png) - -## Installation and usage - -This package requires PHP 7.4 or higher and is fully compatible with PHP8. Installation can be done through [composer](https://www.getcomposer.org). - -```zsh -$ composer require num-num/ubl-invoice -``` - -## Contributing - -This library is not 100% UBL/Peppol feature-complete, in the sense that it doesn't (yet) support **all** UBL XML tags & functionality. "Yet" being the keyword, since this definitely is the long-term goal. All common UBL tags that are required for most invoices are present in the library. This includes tags for discounts, cash discounts, special vat rates, etc... - -If you are missing functionality, please feel free to add it :-) Adding additional tags & attributes is fairly straight-forward. Check out [CONTRIBUTING.md](CONTRIBUTING.md) for more information. - -## Examples & documentation - -This repository does not have a documentation website at this moment. For now, please check out some code examples by checking the unit tests in the `tests` folder. - -## Changelog - -A changelog is available since version v1.9.0. If you are upgrading a minor version (1.x) or major version, please check the changelog to see if you need to implement any breaking changes... - diff --git a/vendor/num-num/ubl-invoice/composer.json b/vendor/num-num/ubl-invoice/composer.json deleted file mode 100644 index c16e02a39..000000000 --- a/vendor/num-num/ubl-invoice/composer.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "num-num/ubl-invoice", - "description": "A modern object-oriented PHP library to create valid UBL and Peppol BIS 3.0 files", - "keywords": [ - "ubl", - "invoice", - "ublinvoice", - "ubl invoice", - "efff", - "electronic invoice", - "digital invoice", - "xml", - "xml invoice", - "peppol", - "peppol bis", - "peppolbis", - "peppol invoice", - "e-invoice", - "einvoice", - "euinvoice" - ], - "homepage": "https://github.com/num-num/ubl-invoice", - "license": "MIT", - "authors": [ - { - "name": "Bert Devriese", - "email": "bert@numnum.be", - "homepage": "https://www.numnum.be", - "role": "Developer" - } - ], - "require": { - "php": "^7.3 || ^8.0", - "sabre/xml": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.0", - "squizlabs/php_codesniffer": "^3.7", - "phpstan/phpstan": "^1.10" - }, - "autoload": { - "psr-4": { - "NumNum\\UBL\\": [ - "src" - ], - "NumNum\\UBL\\Tests\\": [ - "tests" - ] - } - }, - "scripts": { - "test": "vendor/bin/phpunit", - "phpstan": "vendor/bin/phpstan analyse src tests", - "phpcs": "vendor/bin/phpcs -n --standard=phpcs.xml ./src/" - } -} diff --git a/vendor/num-num/ubl-invoice/composer.lock b/vendor/num-num/ubl-invoice/composer.lock deleted file mode 100644 index e563269d2..000000000 --- a/vendor/num-num/ubl-invoice/composer.lock +++ /dev/null @@ -1,1996 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "9a76d358dfc6a0141ffb13da57eac13d", - "packages": [ - { - "name": "sabre/uri", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sabre-io/uri.git", - "reference": "0ab547f34cf15a735e976a285ffc0cfcc27a3f82" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sabre-io/uri/zipball/0ab547f34cf15a735e976a285ffc0cfcc27a3f82", - "reference": "0ab547f34cf15a735e976a285ffc0cfcc27a3f82", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.9", - "phpstan/phpstan": "^1.8", - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "autoload": { - "files": [ - "lib/functions.php" - ], - "psr-4": { - "Sabre\\Uri\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Evert Pot", - "email": "me@evertpot.com", - "homepage": "http://evertpot.com/", - "role": "Developer" - } - ], - "description": "Functions for making sense out of URIs.", - "homepage": "http://sabre.io/uri/", - "keywords": [ - "rfc3986", - "uri", - "url" - ], - "support": { - "forum": "https://groups.google.com/group/sabredav-discuss", - "issues": "https://github.com/sabre-io/uri/issues", - "source": "https://github.com/fruux/sabre-uri" - }, - "time": "2022-09-26T06:12:15+00:00" - }, - { - "name": "sabre/xml", - "version": "4.0.0", - "source": { - "type": "git", - "url": "https://github.com/sabre-io/xml.git", - "reference": "5051b30416b60f52395007c7069acbd010edd2a7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sabre-io/xml/zipball/5051b30416b60f52395007c7069acbd010edd2a7", - "reference": "5051b30416b60f52395007c7069acbd010edd2a7", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-xmlreader": "*", - "ext-xmlwriter": "*", - "lib-libxml": ">=2.6.20", - "php": "^7.4 || ^8.0", - "sabre/uri": ">=2.0,<4.0.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.9", - "phpstan/phpstan": "^1.8", - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "autoload": { - "files": [ - "lib/Deserializer/functions.php", - "lib/Serializer/functions.php" - ], - "psr-4": { - "Sabre\\Xml\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Evert Pot", - "email": "me@evertpot.com", - "homepage": "http://evertpot.com/", - "role": "Developer" - }, - { - "name": "Markus Staab", - "email": "markus.staab@redaxo.de", - "role": "Developer" - } - ], - "description": "sabre/xml is an XML library that you may not hate.", - "homepage": "https://sabre.io/xml/", - "keywords": [ - "XMLReader", - "XMLWriter", - "dom", - "xml" - ], - "support": { - "forum": "https://groups.google.com/group/sabredav-discuss", - "issues": "https://github.com/sabre-io/xml/issues", - "source": "https://github.com/fruux/sabre-xml" - }, - "time": "2022-09-26T08:40:11+00:00" - } - ], - "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.22" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.1" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-03-03T08:28:38+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" - }, - "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" - }, - "type": "library", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2022-03-03T13:19:32+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v4.15.2", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", - "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.2" - }, - "time": "2022-11-12T15:38:23+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" - }, - "time": "2021-07-20T11:28:43+00:00" - }, - { - "name": "phar-io/version", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" - }, - "time": "2022-02-21T01:04:05+00:00" - }, - { - "name": "phpstan/phpstan", - "version": "1.10.29", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "ee5d8f2d3977fb09e55603eee6fb53bdd76ee9c1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ee5d8f2d3977fb09e55603eee6fb53bdd76ee9c1", - "reference": "ee5d8f2d3977fb09e55603eee6fb53bdd76ee9c1", - "shasum": "" - }, - "require": { - "php": "^7.2|^8.0" - }, - "conflict": { - "phpstan/phpstan-shim": "*" - }, - "bin": [ - "phpstan", - "phpstan.phar" - ], - "type": "library", - "autoload": { - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPStan - PHP Static Analysis Tool", - "keywords": [ - "dev", - "static analysis" - ], - "support": { - "docs": "https://phpstan.org/user-guide/getting-started", - "forum": "https://github.com/phpstan/phpstan/discussions", - "issues": "https://github.com/phpstan/phpstan/issues", - "security": "https://github.com/phpstan/phpstan/security/policy", - "source": "https://github.com/phpstan/phpstan-src" - }, - "funding": [ - { - "url": "https://github.com/ondrejmirtes", - "type": "github" - }, - { - "url": "https://github.com/phpstan", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", - "type": "tidelift" - } - ], - "time": "2023-08-14T13:24:11+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "9.2.19", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "c77b56b63e3d2031bd8997fcec43c1925ae46559" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c77b56b63e3d2031bd8997fcec43c1925ae46559", - "reference": "c77b56b63e3d2031bd8997fcec43c1925ae46559", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.14", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.19" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-11-18T07:47:47+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "3.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-12-02T12:48:52+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:58:55+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T05:33:50+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:16:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "9.5.26", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "851867efcbb6a1b992ec515c71cdcf20d895e9d2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/851867efcbb6a1b992ec515c71cdcf20d895e9d2", - "reference": "851867efcbb6a1b992ec515c71cdcf20d895e9d2", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.3.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.13", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", - "sebastian/version": "^3.0.2" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.5-dev" - } - }, - "autoload": { - "files": [ - "src/Framework/Assert/Functions.php" - ], - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.26" - }, - "funding": [ - { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", - "type": "tidelift" - } - ], - "time": "2022-10-28T06:00:21+00:00" - }, - { - "name": "sebastian/cli-parser", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:08:49+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:08:54+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:30:19+00:00" - }, - { - "name": "sebastian/comparator", - "version": "4.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-09-14T12:41:17+00:00" - }, - { - "name": "sebastian/complexity", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:52:27+00:00" - }, - { - "name": "sebastian/diff", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:10:38+00:00" - }, - { - "name": "sebastian/environment", - "version": "5.1.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-04-03T09:37:03+00:00" - }, - { - "name": "sebastian/exporter", - "version": "4.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "https://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-09-14T06:03:37+00:00" - }, - { - "name": "sebastian/global-state", - "version": "5.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-02-14T08:28:10+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-28T06:42:11+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:12:34+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:14:26+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:17:30+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:45:17+00:00" - }, - { - "name": "sebastian/type", - "version": "3.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-09-12T14:47:03+00:00" - }, - { - "name": "sebastian/version", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:39:44+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "3.7.1", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" - }, - "time": "2022-06-18T07:21:10+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2021-07-28T10:34:58+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": "^7.3 || ^8.0" - }, - "platform-dev": [], - "plugin-api-version": "2.3.0" -} diff --git a/vendor/num-num/ubl-invoice/phpcs.xml b/vendor/num-num/ubl-invoice/phpcs.xml deleted file mode 100644 index 312f27fc7..000000000 --- a/vendor/num-num/ubl-invoice/phpcs.xml +++ /dev/null @@ -1,350 +0,0 @@ - - - The PSR-12 coding standard. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - 0 - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - error - Method name "%s" must not be prefixed with an underscore to indicate visibility - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - 0 - - - - - - - - - - - - - - - - - 0 - - - 0 - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/num-num/ubl-invoice/phpunit.xml.dist b/vendor/num-num/ubl-invoice/phpunit.xml.dist deleted file mode 100644 index c04fd1fd9..000000000 --- a/vendor/num-num/ubl-invoice/phpunit.xml.dist +++ /dev/null @@ -1,13 +0,0 @@ - - - - - src/ - - - - - tests - - - diff --git a/vendor/num-num/ubl-invoice/src/AdditionalDocumentReference.php b/vendor/num-num/ubl-invoice/src/AdditionalDocumentReference.php deleted file mode 100644 index 5d2130204..000000000 --- a/vendor/num-num/ubl-invoice/src/AdditionalDocumentReference.php +++ /dev/null @@ -1,140 +0,0 @@ -id; - } - - /** - * @param string $id - * @return AdditionalDocumentReference - */ - public function setId(string $id): AdditionalDocumentReference - { - $this->id = $id; - return $this; - } - - /** - * @return string - */ - public function getDocumentType(): ?string - { - return $this->documentType; - } - - /** - * @param string $documentType - * @return AdditionalDocumentReference - */ - public function setDocumentType(string $documentType): AdditionalDocumentReference - { - $this->documentType = $documentType; - return $this; - } - - /** - * @return int|string|null - */ - public function getDocumentTypeCode() - { - return $this->documentTypeCode; - } - - /** - * @param int|string $documentTypeCode - * @return AdditionalDocumentReference - */ - public function setDocumentTypeCode($documentTypeCode): AdditionalDocumentReference - { - $this->documentTypeCode = $documentTypeCode; - return $this; - } - - /** - * @return string - */ - public function getDocumentDescription(): ?string - { - return $this->documentDescription; - } - - /** - * @param string $documentDescription - * @return AdditionalDocumentReference - */ - public function setDocumentDescription(string $documentDescription): AdditionalDocumentReference - { - $this->documentDescription = $documentDescription; - return $this; - } - - /** - * @return Attachment - */ - public function getAttachment(): ?Attachment - { - return $this->attachment; - } - - /** - * @param Attachment $attachment - * @return AdditionalDocumentReference - */ - public function setAttachment(Attachment $attachment): AdditionalDocumentReference - { - $this->attachment = $attachment; - return $this; - } - - /** - * The xmlSerialize method is called during xml writing. - * - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - $writer->write([ Schema::CBC . 'ID' => $this->id ]); - - if ($this->documentTypeCode !== null) { - $writer->write([ - Schema::CBC . 'DocumentTypeCode' => $this->documentTypeCode - ]); - } - - if ($this->documentType !== null) { - $writer->write([ - Schema::CBC . 'DocumentType' => $this->documentType - ]); - } - - if ($this->documentDescription !== null) { - $writer->write([ - Schema::CBC . 'DocumentDescription' => $this->documentDescription - ]); - } - - if ($this->attachment !== null) { - $writer->write([ - Schema::CAC . 'Attachment' => $this->attachment - ]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/Address.php b/vendor/num-num/ubl-invoice/src/Address.php deleted file mode 100644 index e355acb0b..000000000 --- a/vendor/num-num/ubl-invoice/src/Address.php +++ /dev/null @@ -1,189 +0,0 @@ -streetName; - } - - /** - * @param string $streetName - * @return Address - */ - public function setStreetName(?string $streetName): Address - { - $this->streetName = $streetName; - return $this; - } - - /** - * @return string - */ - public function getAdditionalStreetName(): ?string - { - return $this->additionalStreetName; - } - - /** - * @param string $additionalStreetName - * @return Address - */ - public function setAdditionalStreetName(?string $additionalStreetName): Address - { - $this->additionalStreetName = $additionalStreetName; - return $this; - } - - /** - /** - * @return string - */ - public function getBuildingNumber(): ?string - { - return $this->buildingNumber; - } - - /** - * @param string $buildingNumber - * @return Address - */ - public function setBuildingNumber(?string $buildingNumber): Address - { - $this->buildingNumber = $buildingNumber; - return $this; - } - - /** - * @return string - */ - public function getCityName(): ?string - { - return $this->cityName; - } - - /** - * @param string $cityName - * @return Address - */ - public function setCityName(?string $cityName): Address - { - $this->cityName = $cityName; - return $this; - } - - /** - * @return string - */ - public function getPostalZone(): ?string - { - return $this->postalZone; - } - - /** - * @param string $postalZone - * @return Address - */ - public function setPostalZone(?string $postalZone): Address - { - $this->postalZone = $postalZone; - return $this; - } - - /** - * @return string - */ - public function getCountrySubentity(): ?string - { - return $this->countrySubentity; - } - - /** - * @param string $subentity - * @return Address - */ - public function setCountrySubentity(string $countrySubentity): Address - { - $this->countrySubentity = $countrySubentity; - return $this; - } - - /** - * @return Country - */ - public function getCountry(): ?Country - { - return $this->country; - } - - /** - * @param Country $country - * @return Address - */ - public function setCountry(Country $country): Address - { - $this->country = $country; - return $this; - } - - /** - * The xmlSerialize method is called during xml writing. - * - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - if ($this->streetName !== null) { - $writer->write([ - Schema::CBC . 'StreetName' => $this->streetName - ]); - } - if ($this->additionalStreetName !== null) { - $writer->write([ - Schema::CBC . 'AdditionalStreetName' => $this->additionalStreetName - ]); - } - if ($this->buildingNumber !== null) { - $writer->write([ - Schema::CBC . 'BuildingNumber' => $this->buildingNumber - ]); - } - if ($this->cityName !== null) { - $writer->write([ - Schema::CBC . 'CityName' => $this->cityName, - ]); - } - if ($this->postalZone !== null) { - $writer->write([ - Schema::CBC . 'PostalZone' => $this->postalZone, - ]); - } - if ($this->countrySubentity !== null) { - $writer->write([ - Schema::CBC . 'CountrySubentity' => $this->countrySubentity, - ]); - } - if ($this->country !== null) { - $writer->write([ - Schema::CAC . 'Country' => $this->country, - ]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/AllowanceCharge.php b/vendor/num-num/ubl-invoice/src/AllowanceCharge.php deleted file mode 100644 index b5be94e34..000000000 --- a/vendor/num-num/ubl-invoice/src/AllowanceCharge.php +++ /dev/null @@ -1,227 +0,0 @@ -chargeIndicator; - } - - /** - * @param bool $chargeIndicator - * @return AllowanceCharge - */ - public function setChargeIndicator(bool $chargeIndicator): AllowanceCharge - { - $this->chargeIndicator = $chargeIndicator; - return $this; - } - - /** - * @return int - */ - public function getAllowanceChargeReasonCode(): ?int - { - return $this->allowanceChargeReasonCode; - } - - /** - * @param int $allowanceChargeReasonCode - * @return AllowanceCharge - */ - public function setAllowanceChargeReasonCode(?int $allowanceChargeReasonCode): AllowanceCharge - { - $this->allowanceChargeReasonCode = $allowanceChargeReasonCode; - return $this; - } - - /** - * @return string - */ - public function getAllowanceChargeReason(): ?string - { - return $this->allowanceChargeReason; - } - - /** - * @param string $allowanceChargeReason - * @return AllowanceCharge - */ - public function setAllowanceChargeReason(?string $allowanceChargeReason): AllowanceCharge - { - $this->allowanceChargeReason = $allowanceChargeReason; - return $this; - } - - /** - * @return float - */ - public function getMultiplierFactorNumeric(): ?float - { - return $this->multiplierFactorNumeric; - } - - /** - * @param float $multiplierFactorNumeric - * @return AllowanceCharge - */ - public function setMultiplierFactorNumeric(?float $multiplierFactorNumeric): AllowanceCharge - { - $this->multiplierFactorNumeric = $multiplierFactorNumeric; - return $this; - } - - /** - * @return float - */ - public function getBaseAmount(): ?float - { - return $this->baseAmount; - } - - /** - * @param float $baseAmount - * @return AllowanceCharge - */ - public function setBaseAmount(?float $baseAmount): AllowanceCharge - { - $this->baseAmount = $baseAmount; - return $this; - } - - /** - * @return float - */ - public function getAmount(): ?float - { - return $this->amount; - } - - /** - * @param float $amount - * @return AllowanceCharge - */ - public function setAmount(?float $amount): AllowanceCharge - { - $this->amount = $amount; - return $this; - } - - /** - * @return TaxCategory - */ - public function getTaxCategory(): ?TaxCategory - { - return $this->taxCategory; - } - - /** - * @param TaxCategory $taxCategory - * @return AllowanceCharge - */ - public function setTaxCategory(?TaxCategory $taxCategory): AllowanceCharge - { - $this->taxCategory = $taxCategory; - return $this; - } - - /** - * @return TaxCategory - */ - public function getTaxtotal(): ?TaxTotal - { - return $this->taxTotal; - } - - /** - * @param TaxTotal $taxTotal - * @return AllowanceCharge - */ - public function setTaxtotal(?TaxTotal $taxTotal): AllowanceCharge - { - $this->taxTotal = $taxTotal; - return $this; - } - - /** - * The xmlSerialize method is called during xml writing. - * - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - $writer->write([ - Schema::CBC . 'ChargeIndicator' => $this->chargeIndicator ? 'true' : 'false', - ]); - - if ($this->allowanceChargeReasonCode !== null) { - $writer->write([ - Schema::CBC . 'AllowanceChargeReasonCode' => $this->allowanceChargeReasonCode - ]); - } - - if ($this->allowanceChargeReason !== null) { - $writer->write([ - Schema::CBC . 'AllowanceChargeReason' => $this->allowanceChargeReason - ]); - } - - if ($this->multiplierFactorNumeric !== null) { - $writer->write([ - Schema::CBC . 'MultiplierFactorNumeric' => NumberFormatter::format($this->baseAmount) - ]); - } - - $writer->write([ - [ - 'name' => Schema::CBC . 'Amount', - 'value' => NumberFormatter::format($this->amount, 2), - 'attributes' => [ - 'currencyID' => Generator::$currencyID - ] - ], - ]); - - if ($this->baseAmount !== null) { - $writer->write([ - [ - 'name' => Schema::CBC . 'BaseAmount', - 'value' => NumberFormatter::format($this->baseAmount, 2), - 'attributes' => [ - 'currencyID' => Generator::$currencyID - ] - ] - ]); - } - - if ($this->taxCategory !== null) { - $writer->write([ - Schema::CAC . 'TaxCategory' => $this->taxCategory - ]); - } - - if ($this->taxTotal !== null) { - $writer->write([ - Schema::CAC . 'TaxTotal' => $this->taxTotal - ]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/Attachment.php b/vendor/num-num/ubl-invoice/src/Attachment.php deleted file mode 100644 index 49724070c..000000000 --- a/vendor/num-num/ubl-invoice/src/Attachment.php +++ /dev/null @@ -1,180 +0,0 @@ -filePath)) !== false) { - return $mime_type; - } - - throw new Exception('Could not determine mime_type of '.$this->filePath); - } - - /** - * @return string - */ - public function getFilePath(): ?string - { - return $this->filePath; - } - - /** - * @param string $filePath - * @return Attachment - */ - public function setFilePath(string $filePath): Attachment - { - $this->filePath = $filePath; - return $this; - } - - /** - * @return string - */ - public function getExternalReference(): ?string - { - return $this->externalReference; - } - - /** - * @param string $externalReference - * @return Attachment - */ - public function setExternalReference(string $externalReference): Attachment - { - $this->externalReference = $externalReference; - return $this; - } - - public function getFileStream(): ?string - { - return $this->fileStream; - } - - /** - * @param string $fileStream Base64 encoded filestream - * @param string $fileName - * @return Attachment - */ - public function setFileStream(string $fileStream, string $fileName, ?string $mimeType): Attachment - { - $this->fileStream = $fileStream; - $this->fileName = $fileName; - $this->mimeType = $mimeType; - - return $this; - } - - /** - * @return string - */ - public function getFileName(): string - { - return $this->fileName; - } - - /** - * @param string $fileName - * @return Attachment - */ - public function setFileName(string $fileName): Attachment - { - $this->fileName = $fileName; - return $this; - } - - /** - * @return ?string - */ - public function getMimeType(): ?string - { - return $this->mimeType; - } - - /** - * @param ?string $mimeType - * @return Attachment - */ - public function setMimeType(?string $mimeType): Attachment - { - $this->mimeType = $mimeType; - return $this; - } - - /** - * The validate function that is called during xml writing to valid the data of the object. - * - * @throws InvalidArgumentException An error with information about required data that is missing to write the XML - * @return void - */ - public function validate() - { - if ($this->filePath === null && $this->externalReference === null && $this->fileStream === null) { - throw new InvalidArgumentException('Attachment must have a filePath, an externalReference, or a fileContent'); - } - - if ($this->fileStream !== null && $this->mimeType === null) { - throw new InvalidArgumentException('Using fileStream, you need to define a mimeType by also using setFileMimeType'); - } - - if ($this->filePath !== null && !file_exists($this->filePath)) { - throw new InvalidArgumentException('Attachment at filePath does not exist'); - } - } - - /** - * The xmlSerialize method is called during xml writing. - * - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - $this->validate(); - - if (!empty($this->filePath)) { - $fileContents = base64_encode(file_get_contents($this->filePath)); - $fileName = basename($this->filePath); - $mimeType = $this->getFilePathMimeType(); - } else { - $fileContents = $this->fileStream; - $fileName = $this->fileName; - $mimeType = $this->mimeType; - } - - $writer->write([ - 'name' => Schema::CBC . 'EmbeddedDocumentBinaryObject', - 'value' => $fileContents, - 'attributes' => [ - 'mimeCode' => $mimeType, - 'filename' => $fileName, - ] - ]); - - if ($this->externalReference) { - $writer->writeElement( - Schema::CAC . 'ExternalReference', - [ Schema::CBC . 'URI' => $this->externalReference ] - ); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/BillingReference.php b/vendor/num-num/ubl-invoice/src/BillingReference.php deleted file mode 100644 index 831282487..000000000 --- a/vendor/num-num/ubl-invoice/src/BillingReference.php +++ /dev/null @@ -1,57 +0,0 @@ -invoiceDocumentReference; - } - - /** - * - * @return BillingReference - */ - public function setInvoiceDocumentReference($invoiceDocumentReference): BillingReference - { - $this->invoiceDocumentReference = $invoiceDocumentReference; - return $this; - } - - /** - * The validate function that is called during xml writing to valid the data of the object. - * - * @throws InvalidArgumentException An error with information about required data that is missing to write the XML - * @return void - */ - public function validate() - { - if ($this->invoiceDocumentReference === null) { - throw new InvalidArgumentException('Missing billingreference invoicedocumentreference'); - } - } - - /** - * The xmlSerialize method is called during xml writing. - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - $this->validate(); - - $writer->write([Schema::CAC . 'InvoiceDocumentReference' => $this->invoiceDocumentReference]); - } -} diff --git a/vendor/num-num/ubl-invoice/src/ClassifiedTaxCategory.php b/vendor/num-num/ubl-invoice/src/ClassifiedTaxCategory.php deleted file mode 100644 index af50bcd9d..000000000 --- a/vendor/num-num/ubl-invoice/src/ClassifiedTaxCategory.php +++ /dev/null @@ -1,239 +0,0 @@ -id)) { - return $this->id; - } - - if ($this->getPercent() !== null) { - return ($this->getPercent() > 0) - ? UNCL5305::STANDARD_RATE - : UNCL5305::ZERO_RATED_GOODS; - } - - return null; - } - - /** - * @param string $id - * @return ClassifiedTaxCategory - */ - public function setId(?string $id): ClassifiedTaxCategory - { - $this->id = $id; - return $this; - } - - /** - * @return string - */ - public function getName(): ?string - { - return $this->name; - } - - /** - * @param string $name - * @return ClassifiedTaxCategory - */ - public function setName(?string $name): ClassifiedTaxCategory - { - $this->name = $name; - return $this; - } - - /** - * @return float - */ - public function getPercent(): ?float - { - return $this->percent; - } - - /** - * @param float $percent - * @return ClassifiedTaxCategory - */ - public function setPercent(?float $percent): ClassifiedTaxCategory - { - $this->percent = $percent; - return $this; - } - - /** - * @return TaxScheme - */ - public function getTaxScheme(): ?TaxScheme - { - return $this->taxScheme; - } - - /** - * @param TaxScheme $taxScheme - * @return ClassifiedTaxCategory - */ - public function setTaxScheme(?TaxScheme $taxScheme): ClassifiedTaxCategory - { - $this->taxScheme = $taxScheme; - return $this; - } - - /** - * @return string - */ - public function getSchemeID(): ?string - { - return $this->schemeID; - } - - /** - * @param string $id - * @return ClassifiedTaxCategory - */ - public function setSchemeID(?string $id): ClassifiedTaxCategory - { - $this->schemeID = $id; - return $this; - } - - /** - * @return string - */ - public function getSchemeName(): ?string - { - return $this->schemeName; - } - - /** - * @param string $name - * @return ClassifiedTaxCategory - */ - public function setSchemeName(?string $name): ClassifiedTaxCategory - { - $this->schemeName = $name; - return $this; - } - - /** - * @return string - */ - public function getTaxExemptionReason(): ?string - { - return $this->taxExemptionReason; - } - - /** - * @param string $taxExemptionReason - * @return ClassifiedTaxCategory - */ - public function setTaxExemptionReason(?string $taxExemptionReason): ClassifiedTaxCategory - { - $this->taxExemptionReason = $taxExemptionReason; - return $this; - } - - /** - * @return string - */ - public function getTaxExemptionReasonCode(): ?string - { - return $this->taxExemptionReasonCode; - } - - /** - * @param string $taxExemptionReasonCode - * @return ClassifiedTaxCategory - */ - public function setTaxExemptionReasonCode(?string $taxExemptionReasonCode): ClassifiedTaxCategory - { - $this->taxExemptionReasonCode = $taxExemptionReasonCode; - return $this; - } - - /** - * The validate function that is called during xml writing to valid the data of the object. - * - * @throws InvalidArgumentException An error with information about required data that is missing to write the XML - * @return void - */ - public function validate() - { - if ($this->getId() === null) { - throw new InvalidArgumentException('Missing taxcategory id'); - } - } - - /** - * The xmlSerialize method is called during xml writing. - * - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - $this->validate(); - - $schemeAttributes = []; - if ($this->schemeID !== null) { - $schemeAttributes['schemeID'] = $this->schemeID; - } - if ($this->schemeName !== null) { - $schemeAttributes['schemeName'] = $this->schemeName; - } - - $writer->write([ - 'name' => Schema::CBC . 'ID', - 'value' => $this->getId(), - 'attributes' => $schemeAttributes - ]); - - if ($this->name !== null) { - $writer->write([ - Schema::CBC . 'Name' => $this->name, - ]); - } - - if ($this->percent !== null) { - $writer->write([ - Schema::CBC . 'Percent' => number_format($this->percent, 2, '.', ''), - ]); - } - - if ($this->taxExemptionReasonCode !== null) { - $writer->write([ - Schema::CBC . 'TaxExemptionReasonCode' => $this->taxExemptionReasonCode, - Schema::CBC . 'TaxExemptionReason' => $this->taxExemptionReason, - ]); - } - - if ($this->taxScheme !== null) { - $writer->write([Schema::CAC . 'TaxScheme' => $this->taxScheme]); - } else { - $writer->write([ - Schema::CAC . 'TaxScheme' => null, - ]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/CommodityClassification.php b/vendor/num-num/ubl-invoice/src/CommodityClassification.php deleted file mode 100644 index 37bcf7172..000000000 --- a/vendor/num-num/ubl-invoice/src/CommodityClassification.php +++ /dev/null @@ -1,90 +0,0 @@ -itemClassificationCode; - } - - /** - * @param string $itemClassificationCode - * @return CommodityClassification - */ - public function setItemClassificationCode(?string $itemClassificationCode): CommodityClassification - { - $this->itemClassificationCode = $itemClassificationCode; - return $this; - } - - /** - * @return ?string - */ - public function getItemClassificationListId(): ?string - { - return $this->itemClassificationListId; - } - - /** - * @param ?string $itemClassificationListId - * @return CommodityClassification - */ - public function setItemClassificationListId(?string $itemClassificationListId): CommodityClassification - { - $this->itemClassificationListId = $itemClassificationListId; - return $this; - } - - /** - * @return ?string - */ - public function getItemClassificationListVersionId(): ?string - { - return $this->itemClassificationListVersionId; - } - - /** - * @param ?string $itemClassificationListVersionId - * @return CommodityClassification - */ - public function setItemClassificationListVersionId(?string $itemClassificationListVersionId): CommodityClassification - { - $this->itemClassificationListVersionId = $itemClassificationListVersionId; - return $this; - } - - /** - * The xmlSerialize method is called during xml writing. - * - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - $attributes = [ - 'listID' => $this->itemClassificationListId ?? '', - ]; - - if (!empty($this->itemClassificationListVersionId)) { - $attributes['listVersionID'] = $this->itemClassificationListVersionId; - } - - $writer->write([ - 'name' => Schema::CBC . 'ItemClassificationCode', - 'value' => $this->itemClassificationCode ?? '', - 'attributes' => $attributes - ]); - } -} diff --git a/vendor/num-num/ubl-invoice/src/Contact.php b/vendor/num-num/ubl-invoice/src/Contact.php deleted file mode 100644 index 69af6c898..000000000 --- a/vendor/num-num/ubl-invoice/src/Contact.php +++ /dev/null @@ -1,144 +0,0 @@ -id; - } - - /** - * @param string $id - * @return Contact - */ - public function setId(string $id): Contact - { - $this->id = $id; - return $this; - } - - /** - * @return string - */ - public function getName(): ?string - { - return $this->name; - } - - /** - * @param mixed $name - * @return Contact - */ - public function setName($name): Contact - { - $this->name = $name; - return $this; - } - - /** - * @return mixed - */ - public function getTelephone(): ?string - { - return $this->telephone; - } - - /** - * @param string $telephone - * @return Contact - */ - public function setTelephone(?string $telephone): Contact - { - $this->telephone = $telephone; - return $this; - } - - /** - * @return string - */ - public function getTelefax(): ?string - { - return $this->telefax; - } - - /** - * @param string $telefax - * @return Contact - */ - public function setTelefax(?string $telefax): Contact - { - $this->telefax = $telefax; - return $this; - } - - /** - * @return string - */ - public function getElectronicMail(): ?string - { - return $this->electronicMail; - } - - /** - * @param string $electronicMail - * @return Contact - */ - public function setElectronicMail(?string $electronicMail): Contact - { - $this->electronicMail = $electronicMail; - return $this; - } - - /** - * The xmlSerialize method is called during xml writing. - * - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - if ($this->id !== null) { - $writer->write([ - Schema::CBC . 'ID' => $this->id - ]); - } - - if ($this->name !== null) { - $writer->write([ - Schema::CBC . 'Name' => $this->name - ]); - } - - if ($this->telephone !== null) { - $writer->write([ - Schema::CBC . 'Telephone' => $this->telephone - ]); - } - - if ($this->telefax !== null) { - $writer->write([ - Schema::CBC . 'Telefax' => $this->telefax - ]); - } - - if ($this->electronicMail !== null) { - $writer->write([ - Schema::CBC . 'ElectronicMail' => $this->electronicMail - ]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/ContractDocumentReference.php b/vendor/num-num/ubl-invoice/src/ContractDocumentReference.php deleted file mode 100644 index 5b25c0557..000000000 --- a/vendor/num-num/ubl-invoice/src/ContractDocumentReference.php +++ /dev/null @@ -1,42 +0,0 @@ -id; - } - - /** - * @param string $id - * @return ContractDocumentReference - */ - public function setId(string $id): ContractDocumentReference - { - $this->id = $id; - return $this; - } - - /** - * The xmlSerialize method is called during xml writing. - * - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - if ($this->id !== null) { - $writer->write([ Schema::CBC . 'ID' => $this->id ]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/Country.php b/vendor/num-num/ubl-invoice/src/Country.php deleted file mode 100644 index be95722b5..000000000 --- a/vendor/num-num/ubl-invoice/src/Country.php +++ /dev/null @@ -1,69 +0,0 @@ -identificationCode; - } - - /** - * @param mixed $identificationCode - * @return Country - */ - public function setIdentificationCode(?string $identificationCode): Country - { - $this->identificationCode = $identificationCode; - return $this; - } - - /** - * @return mixed - */ - public function getListId(): ?string - { - return $this->listId; - } - - /** - * @param mixed $listId - * @return Country - */ - public function setListId(?string $listId): Country - { - $this->listId = $listId; - return $this; - } - - /** - * The xmlSerialize method is called during xml writing. - * - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - $attributes = []; - - if (!empty($this->listId)) { - $attributes['listID'] = 'ISO3166-1:Alpha2'; - } - - $writer->write([ - 'name' => Schema::CBC . 'IdentificationCode', - 'value' => $this->identificationCode, - 'attributes' => $attributes - ]); - } -} diff --git a/vendor/num-num/ubl-invoice/src/CreditNote.php b/vendor/num-num/ubl-invoice/src/CreditNote.php deleted file mode 100644 index d0f871af8..000000000 --- a/vendor/num-num/ubl-invoice/src/CreditNote.php +++ /dev/null @@ -1,30 +0,0 @@ -invoiceLines; - } - - /** - * @param CreditNoteLine[] $creditNoteLines - * @return CreditNote - */ - public function setCreditNoteLines(array $creditNoteLines): CreditNote - { - $this->invoiceLines = $creditNoteLines; - return $this; - } -} diff --git a/vendor/num-num/ubl-invoice/src/CreditNoteLine.php b/vendor/num-num/ubl-invoice/src/CreditNoteLine.php deleted file mode 100644 index 42cda4fc9..000000000 --- a/vendor/num-num/ubl-invoice/src/CreditNoteLine.php +++ /dev/null @@ -1,27 +0,0 @@ -invoicedQuantity; - } - - /** - * @param ?float $creditedQuantity - * @return CreditNoteLine - */ - public function setCreditedQuantity(?float $creditedQuantity): CreditNoteLine - { - $this->invoicedQuantity = $creditedQuantity; - return $this; - } -} diff --git a/vendor/num-num/ubl-invoice/src/Delivery.php b/vendor/num-num/ubl-invoice/src/Delivery.php deleted file mode 100644 index cb3220e8f..000000000 --- a/vendor/num-num/ubl-invoice/src/Delivery.php +++ /dev/null @@ -1,93 +0,0 @@ -actualDeliveryDate; - } - - /** - * @param DateTime $actualDeliveryDate - * @return Delivery - */ - public function setActualDeliveryDate($actualDeliveryDate): Delivery - { - $this->actualDeliveryDate = $actualDeliveryDate; - return $this; - } - - /** - * @return Address - */ - public function getDeliveryLocation() - { - return $this->deliveryLocation; - } - - /** - * @param Address $deliveryLocation - * @return Delivery - */ - public function setDeliveryLocation($deliveryLocation): Delivery - { - $this->deliveryLocation = $deliveryLocation; - return $this; - } - - /** - * @return Party - */ - public function getDeliveryParty() - { - return $this->deliveryParty; - } - - /** - * @param Party $deliveryParty - * @return Delivery - */ - public function setDeliveryParty($deliveryParty): Delivery - { - $this->deliveryParty = $deliveryParty; - return $this; - } - - /** - * The xmlSerialize method is called during xml writing. - * - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - if ($this->actualDeliveryDate != null) { - $writer->write([ - Schema::CBC . 'ActualDeliveryDate' => $this->actualDeliveryDate->format('Y-m-d') - ]); - } - if ($this->deliveryLocation != null) { - $writer->write([ - Schema::CAC . 'DeliveryLocation' => [ Schema::CAC . 'Address' => $this->deliveryLocation ] - ]); - } - if ($this->deliveryParty != null) { - $writer->write([ - Schema::CAC . 'DeliveryParty' => $this->deliveryParty - ]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/EASCode.php b/vendor/num-num/ubl-invoice/src/EASCode.php deleted file mode 100644 index 1b9dc862a..000000000 --- a/vendor/num-num/ubl-invoice/src/EASCode.php +++ /dev/null @@ -1,109 +0,0 @@ -id; - } - - /** - * @param string $id - * @return FinancialInstitutionBranch - */ - public function setId(?string $id): FinancialInstitutionBranch - { - $this->id = $id; - return $this; - } - - public function xmlSerialize(Writer $writer): void - { - $writer->write([ - Schema::CBC . 'ID' => $this->id - ]); - } -} diff --git a/vendor/num-num/ubl-invoice/src/Generator.php b/vendor/num-num/ubl-invoice/src/Generator.php deleted file mode 100644 index f08500c79..000000000 --- a/vendor/num-num/ubl-invoice/src/Generator.php +++ /dev/null @@ -1,44 +0,0 @@ -namespaceMap = [ - 'urn:oasis:names:specification:ubl:schema:xsd:' . $invoice->xmlTagName . '-2' => '', - 'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2' => 'cbc', - 'urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2' => 'cac' - ]; - - return $xmlService->write($invoice->xmlTagName, [ - $invoice - ]); - } - - public static function creditNote(CreditNote $creditNote, $currencyId = 'EUR') - { - self::$currencyID = $currencyId; - - $xmlService = new Service(); - - $xmlService->namespaceMap = [ - 'urn:oasis:names:specification:ubl:schema:xsd:' . $creditNote->xmlTagName . '-2' => '', - 'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2' => 'cbc', - 'urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2' => 'cac' - ]; - - return $xmlService->write($creditNote->xmlTagName, [ - $creditNote - ]); - } -} \ No newline at end of file diff --git a/vendor/num-num/ubl-invoice/src/ICDCode.php b/vendor/num-num/ubl-invoice/src/ICDCode.php deleted file mode 100644 index 2b6962ee8..000000000 --- a/vendor/num-num/ubl-invoice/src/ICDCode.php +++ /dev/null @@ -1,244 +0,0 @@ -UBLVersionID; - } - - /** - * @param string $UBLVersionID - * eg. '2.0', '2.1', '2.2', ... - * @return Invoice - */ - public function setUBLVersionID(?string $UBLVersionID): Invoice - { - $this->UBLVersionID = $UBLVersionID; - return $this; - } - - /** - * @return mixed - */ - public function getId(): ?string - { - return $this->id; - } - - /** - * @param mixed $id - * @return Invoice - */ - public function setId(?string $id): Invoice - { - $this->id = $id; - return $this; - } - - /** - * @param mixed $customizationID - * @return Invoice - */ - public function setCustomizationID(?string $customizationID): Invoice - { - $this->customizationID = $customizationID; - return $this; - } - - /** - * @param mixed $profileID - * @return Invoice - */ - public function setProfileID(?string $profileID): Invoice - { - $this->profileID = $profileID; - return $this; - } - - /** - * @return bool - */ - public function isCopyIndicator(): bool - { - return $this->copyIndicator; - } - - /** - * @param bool $copyIndicator - * @return Invoice - */ - public function setCopyIndicator(bool $copyIndicator): Invoice - { - $this->copyIndicator = $copyIndicator; - return $this; - } - - /** - * @return DateTime - */ - public function getIssueDate(): ?DateTime - { - return $this->issueDate; - } - - /** - * @param DateTime $issueDate - * @return Invoice - */ - public function setIssueDate(DateTime $issueDate): Invoice - { - $this->issueDate = $issueDate; - return $this; - } - - /** - * @return DateTime - */ - public function getDueDate(): ?DateTime - { - return $this->dueDate; - } - - /** - * @param DateTime $dueDate - * @return Invoice - */ - public function setDueDate(DateTime $dueDate): Invoice - { - $this->dueDate = $dueDate; - return $this; - } - - /** - * @param mixed $currencyCode - * @return Invoice - */ - public function setDocumentCurrencyCode(string $currencyCode = 'EUR'): Invoice - { - $this->documentCurrencyCode = $currencyCode; - return $this; - } - - /** - * @return string - */ - public function getInvoiceTypeCode(): ?string - { - return $this->invoiceTypeCode; - } - - /** - * @param string $invoiceTypeCode - * See also: src/InvoiceTypeCode.php - * @return Invoice - */ - public function setInvoiceTypeCode(string $invoiceTypeCode): Invoice - { - $this->invoiceTypeCode = $invoiceTypeCode; - return $this; - } - - /** - * @return string - */ - public function getNote() - { - return $this->note; - } - - /** - * @param string $note - * @return Invoice - */ - public function setNote(string $note) - { - $this->note = $note; - return $this; - } - - /** - * @return DateTime - */ - public function getTaxPointDate(): ?DateTime - { - return $this->taxPointDate; - } - - /** - * @param DateTime $taxPointDate - * @return Invoice - */ - public function setTaxPointDate(DateTime $taxPointDate): Invoice - { - $this->taxPointDate = $taxPointDate; - return $this; - } - - /** - * @return PaymentTerms - */ - public function getPaymentTerms(): ?PaymentTerms - { - return $this->paymentTerms; - } - - /** - * @param PaymentTerms $paymentTerms - * @return Invoice - */ - public function setPaymentTerms(PaymentTerms $paymentTerms): Invoice - { - $this->paymentTerms = $paymentTerms; - return $this; - } - - /** - * @return Party - */ - public function getAccountingSupplierParty(): ?Party - { - return $this->accountingSupplierParty; - } - - /** - * @param Party $accountingSupplierParty - * @return Invoice - */ - public function setAccountingSupplierParty(Party $accountingSupplierParty): Invoice - { - $this->accountingSupplierParty = $accountingSupplierParty; - return $this; - } - - /** - * @return Party - */ - public function getSupplierAssignedAccountID(): ?string - { - return $this->supplierAssignedAccountID; - } - - /** - * @param string $supplierAssignedAccountID - * @return Invoice - */ - public function setSupplierAssignedAccountID(string $supplierAssignedAccountID): Invoice - { - $this->supplierAssignedAccountID = $supplierAssignedAccountID; - return $this; - } - - /** - * @return Party - */ - public function getAccountingCustomerParty(): ?Party - { - return $this->accountingCustomerParty; - } - - /** - * @param Party $accountingCustomerParty - * @return Invoice - */ - public function setAccountingCustomerParty(Party $accountingCustomerParty): Invoice - { - $this->accountingCustomerParty = $accountingCustomerParty; - return $this; - } - - /** - * @return ?Contact - */ - public function getAccountingCustomerPartyContact(): ?Contact - { - return $this->accountingCustomerPartyContact; - } - - /** - * @param Contact $accountingCustomerPartyContact - * @return Invoice - */ - public function setAccountingCustomerPartyContact(Contact $accountingCustomerPartyContact): Invoice - { - $this->accountingCustomerPartyContact = $accountingCustomerPartyContact; - return $this; - } - - /** - * @return Party - */ - public function getPayeeParty(): ?Party - { - return $this->payeeParty; - } - - /** - * @param Party $payeeParty - * @return Invoice - */ - public function setPayeeParty(Party $payeeParty): Invoice - { - $this->payeeParty = $payeeParty; - return $this; - } - - /** - * @return PaymentMeans[] - */ - public function getPaymentMeans(): ?array - { - return $this->paymentMeans; - } - - /** - * @param PaymentMeans[] $paymentMeans - * @return Invoice - */ - public function setPaymentMeans(array $paymentMeans): Invoice - { - $this->paymentMeans = $paymentMeans; - return $this; - } - - /** - * @return TaxTotal - */ - public function getTaxTotal(): ?TaxTotal - { - return $this->taxTotal; - } - - /** - * @param TaxTotal $taxTotal - * @return Invoice - */ - public function setTaxTotal(TaxTotal $taxTotal): Invoice - { - $this->taxTotal = $taxTotal; - return $this; - } - - /** - * @return LegalMonetaryTotal - */ - public function getLegalMonetaryTotal(): ?LegalMonetaryTotal - { - return $this->legalMonetaryTotal; - } - - /** - * @param LegalMonetaryTotal $legalMonetaryTotal - * @return Invoice - */ - public function setLegalMonetaryTotal(LegalMonetaryTotal $legalMonetaryTotal): Invoice - { - $this->legalMonetaryTotal = $legalMonetaryTotal; - return $this; - } - - /** - * @return InvoiceLine[] - */ - public function getInvoiceLines(): ?array - { - return $this->invoiceLines; - } - - /** - * @param InvoiceLine[] $invoiceLines - * @return Invoice - */ - public function setInvoiceLines(array $invoiceLines): Invoice - { - $this->invoiceLines = $invoiceLines; - return $this; - } - - /** - * @return AllowanceCharge[] - */ - public function getAllowanceCharges(): ?array - { - return $this->allowanceCharges; - } - - /** - * @param AllowanceCharge[] $allowanceCharges - * @return Invoice - */ - public function setAllowanceCharges(array $allowanceCharges): Invoice - { - $this->allowanceCharges = $allowanceCharges; - return $this; - } - - /** - * @return AdditionalDocumentReference - * @deprecated Deprecated since v1.16 - Replace implementation with setAdditionalDocumentReference or addAdditionalDocumentReference to add/set a single AdditionalDocumentReference - */ - public function getAdditionalDocumentReference(): ?AdditionalDocumentReference - { - return $this->additionalDocumentReferences[0] ?? null; - } - - /** - * @return array - */ - public function getAdditionalDocumentReferences(): array - { - return $this->additionalDocumentReferences ?? []; - } - - /** - * @param AdditionalDocumentReference $additionalDocumentReference - * @return Invoice - */ - public function setAdditionalDocumentReference(AdditionalDocumentReference $additionalDocumentReference): Invoice - { - $this->additionalDocumentReferences = [$additionalDocumentReference]; - return $this; - } - - /** - * @param AdditionalDocumentReference $additionalDocumentReference - * @return Invoice - */ - public function setAdditionalDocumentReferences(array $additionalDocumentReference): Invoice - { - $this->additionalDocumentReferences = $additionalDocumentReference; - return $this; - } - - /** - * @param AdditionalDocumentReference $additionalDocumentReference - * @return Invoice - */ - public function addAdditionalDocumentReference(AdditionalDocumentReference $additionalDocumentReference): Invoice - { - $this->additionalDocumentReferences[] = $additionalDocumentReference; - return $this; - } - - /** - * @param ProjectReference $projectReference - * @return Invoice - */ - public function setProjectReference(ProjectReference $projectReference): Invoice - { - $this->projectReference = $projectReference; - return $this; - } - - /** - * @return ProjectReference projectReference - */ - public function getProjectReference(): ?ProjectReference - { - return $this->projectReference; - } - - /** - * @param string $buyerReference - * @return Invoice - */ - public function setBuyerReference(string $buyerReference): Invoice - { - $this->buyerReference = $buyerReference; - return $this; - } - - /** - * @return string buyerReference - */ - public function getBuyerReference(): ?string - { - return $this->buyerReference; - } - - /** - * @return mixed - */ - public function getAccountingCostCode(): ?string - { - return $this->accountingCostCode; - } - - /** - * @param mixed $accountingCostCode - * @return Invoice - */ - public function setAccountingCostCode(string $accountingCostCode): Invoice - { - $this->accountingCostCode = $accountingCostCode; - return $this; - } - - /** - * @return InvoicePeriod - */ - public function getInvoicePeriod(): ?InvoicePeriod - { - return $this->invoicePeriod; - } - - /** - * @param InvoicePeriod $invoicePeriod - * @return Invoice - */ - public function setInvoicePeriod(InvoicePeriod $invoicePeriod): Invoice - { - $this->invoicePeriod = $invoicePeriod; - return $this; - } - - /** - * Get the reference to the invoice that is being credited - * - * @return ?BillingReference - */ - public function getBillingReference(): ?BillingReference - { - return $this->billingReference; - } - - /** - * Set the reference to the invoice that is being credited - * - * @return CreditNote - */ - public function setBillingReference($billingReference): CreditNote - { - $this->billingReference = $billingReference; - return $this; - } - - /** - * @return Delivery - */ - public function getDelivery(): ?Delivery - { - return $this->delivery; - } - - /** - * @param Delivery $delivery - * @return Invoice - */ - public function setDelivery(Delivery $delivery): Invoice - { - $this->delivery = $delivery; - return $this; - } - - /** - * @return OrderReference - */ - public function getOrderReference(): ?OrderReference - { - return $this->orderReference; - } - - /** - * @param OrderReference $orderReference - * @return Invoice - */ - public function setOrderReference(OrderReference $orderReference): Invoice - { - $this->orderReference = $orderReference; - return $this; - } - - /** - * @return ContractDocumentReference - */ - public function getContractDocumentReference(): ?ContractDocumentReference - { - return $this->contractDocumentReference; - } - - /** - * @param string $ContractDocumentReference - * @return Invoice - */ - public function setContractDocumentReference(ContractDocumentReference $contractDocumentReference): Invoice - { - $this->contractDocumentReference = $contractDocumentReference; - return $this; - } - - /** - * The validate function that is called during xml writing to valid the data of the object. - * - * @return void - * @throws InvalidArgumentException An error with information about required data that is missing to write the XML - */ - public function validate() - { - if ($this->id === null) { - throw new InvalidArgumentException('Missing invoice id'); - } - - if (!$this->issueDate instanceof DateTime) { - throw new InvalidArgumentException('Invalid invoice issueDate'); - } - - if ($this->invoiceTypeCode === null) { - throw new InvalidArgumentException('Missing invoice invoiceTypeCode'); - } - - if ($this->accountingSupplierParty === null) { - throw new InvalidArgumentException('Missing invoice accountingSupplierParty'); - } - - if ($this->accountingCustomerParty === null) { - throw new InvalidArgumentException('Missing invoice accountingCustomerParty'); - } - - if ($this->invoiceLines === null) { - throw new InvalidArgumentException('Missing invoice lines'); - } - - if ($this->legalMonetaryTotal === null) { - throw new InvalidArgumentException('Missing invoice LegalMonetaryTotal'); - } - } - - /** - * The xmlSerialize method is called during xml writing. - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - $this->validate(); - - $writer->write([ - Schema::CBC . 'UBLVersionID' => $this->UBLVersionID, - Schema::CBC . 'CustomizationID' => $this->customizationID, - ]); - - if ($this->profileID !== null) { - $writer->write([ - Schema::CBC . 'ProfileID' => $this->profileID - ]); - } - - $writer->write([ - Schema::CBC . 'ID' => $this->id - ]); - - if ($this->copyIndicator !== null) { - $writer->write([ - Schema::CBC . 'CopyIndicator' => $this->copyIndicator ? 'true' : 'false' - ]); - } - - $writer->write([ - Schema::CBC . 'IssueDate' => $this->issueDate->format('Y-m-d'), - ]); - - if ($this->dueDate !== null && $this->xmlTagName === 'Invoice') { - $writer->write([ - Schema::CBC . 'DueDate' => $this->dueDate->format('Y-m-d') - ]); - } - - if ($this->invoiceTypeCode !== null) { - $writer->write([ - Schema::CBC . $this->xmlTagName . 'TypeCode' => $this->invoiceTypeCode - ]); - } - - if ($this->note !== null) { - $writer->write([ - Schema::CBC . 'Note' => $this->note - ]); - } - - if ($this->taxPointDate !== null) { - $writer->write([ - Schema::CBC . 'TaxPointDate' => $this->taxPointDate->format('Y-m-d') - ]); - } - - $writer->write([ - Schema::CBC . 'DocumentCurrencyCode' => $this->documentCurrencyCode, - ]); - - if ($this->accountingCostCode !== null) { - $writer->write([ - Schema::CBC . 'AccountingCostCode' => $this->accountingCostCode - ]); - } - - if ($this->buyerReference != null) { - $writer->write([ - Schema::CBC . 'BuyerReference' => $this->buyerReference - ]); - } - - if ($this->invoicePeriod != null) { - $writer->write([ - Schema::CAC . 'InvoicePeriod' => $this->invoicePeriod - ]); - } - - if ($this->orderReference != null) { - $writer->write([ - Schema::CAC . 'OrderReference' => $this->orderReference - ]); - } - - if ($this->billingReference != null) { - $writer->write([ - Schema::CAC . 'BillingReference' => $this->billingReference - ]); - } - - if ($this->contractDocumentReference !== null) { - $writer->write([ - Schema::CAC . 'ContractDocumentReference' => $this->contractDocumentReference, - ]); - } - - if (!empty($this->additionalDocumentReferences)) { - foreach ($this->additionalDocumentReferences as $additionalDocumentReference) { - $writer->write([ - Schema::CAC . 'AdditionalDocumentReference' => $additionalDocumentReference - ]); - } - } - - if ($this->projectReference != null) { - $writer->write([ - Schema::CAC . 'ProjectReference' => $this->projectReference - ]); - } - - $customerParty = array_filter([ - Schema::CBC . 'SupplierAssignedAccountID' => $this->supplierAssignedAccountID, - Schema::CAC . 'Party' => $this->accountingCustomerParty, - Schema::CAC . 'AccountingContact' => $this->accountingCustomerPartyContact, - ]); - - $writer->write([ - Schema::CAC . 'AccountingSupplierParty' => [Schema::CAC . 'Party' => $this->accountingSupplierParty], - Schema::CAC . 'AccountingCustomerParty' => $customerParty, - ]); - - if ($this->payeeParty != null) { - $writer->write([ - Schema::CAC . 'PayeeParty' => $this->payeeParty - ]); - } - - if ($this->delivery != null) { - $writer->write([ - Schema::CAC . 'Delivery' => $this->delivery - ]); - } - - if ($this->paymentMeans !== null) { - foreach($this->paymentMeans as $paymentMeans) { - $writer->write([ - Schema::CAC . $paymentMeans->xmlTagName => $paymentMeans - ]); - } - } - - if ($this->paymentTerms !== null) { - $writer->write([ - Schema::CAC . 'PaymentTerms' => $this->paymentTerms - ]); - } - - if ($this->allowanceCharges !== null) { - foreach ($this->allowanceCharges as $allowanceCharge) { - $writer->write([ - Schema::CAC . 'AllowanceCharge' => $allowanceCharge - ]); - } - } - - if ($this->taxTotal !== null) { - $writer->write([ - Schema::CAC . 'TaxTotal' => $this->taxTotal - ]); - } - - $writer->write([ - Schema::CAC . 'LegalMonetaryTotal' => $this->legalMonetaryTotal - ]); - - foreach ($this->invoiceLines as $invoiceLine) { - $writer->write([ - Schema::CAC . $invoiceLine->xmlTagName => $invoiceLine - ]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/InvoiceDocumentReference.php b/vendor/num-num/ubl-invoice/src/InvoiceDocumentReference.php deleted file mode 100644 index 529464030..000000000 --- a/vendor/num-num/ubl-invoice/src/InvoiceDocumentReference.php +++ /dev/null @@ -1,96 +0,0 @@ -originalInvoiceId; - } - - /** - * Set the id of the invoice that is being credited - * - * @return InvoiceDocumentReference - */ - public function setOriginalInvoiceId(string $invoiceRef): InvoiceDocumentReference - { - $this->originalInvoiceId = $invoiceRef; - return $this; - } - - /** - * Get the issue date of the original invoice that is being credited - * - * @return ?DateTime - */ - public function getIssueDate(): ?DateTime - { - return $this->issueDate; - } - - /** - * Set the issue date of the original invoice that is being credited - * - * @return InvoiceDocumentReference - */ - public function setIssueDate(DateTime $issueDate): InvoiceDocumentReference - { - $this->issueDate = $issueDate; - return $this; - } - - /** - * The validate function that is called during xml writing to valid the data of the object. - * - * @throws InvalidArgumentException An error with information about required data that is missing to write the XML - * @return void - */ - public function validate() - { - if ($this->originalInvoiceId === null) { - throw new InvalidArgumentException('Missing invoicedocumentreference originalinvoiceid'); - } - } - - /** - * The xmlSerialize method is called during xml writing. - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - $this->validate(); - - $writer->write([ - [ - 'name' => Schema::CBC . 'ID', - 'value' => $this->originalInvoiceId - ] - ]); - - if ($this->issueDate != null) - { - $writer->write([ - [ - 'name' => Schema::CBC . 'IssueDate', - 'value' => $this->issueDate->format('Y-m-d') - ] - ]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/InvoiceLine.php b/vendor/num-num/ubl-invoice/src/InvoiceLine.php deleted file mode 100644 index f34bf6e8a..000000000 --- a/vendor/num-num/ubl-invoice/src/InvoiceLine.php +++ /dev/null @@ -1,367 +0,0 @@ -id; - } - - /** - * @param string $id - * @return InvoiceLine - */ - public function setId(?string $id): InvoiceLine - { - $this->id = $id; - return $this; - } - - /** - * @return float - */ - public function getInvoicedQuantity(): ?float - { - return $this->invoicedQuantity; - } - - /** - * @param ?float $invoicedQuantity - * @return InvoiceLine - */ - public function setInvoicedQuantity(?float $invoicedQuantity): InvoiceLine - { - $this->invoicedQuantity = $invoicedQuantity; - return $this; - } - - /** - * @return float - */ - public function getLineExtensionAmount(): ?float - { - return $this->lineExtensionAmount; - } - - /** - * @param float $lineExtensionAmount - * @return InvoiceLine - */ - public function setLineExtensionAmount(?float $lineExtensionAmount): InvoiceLine - { - $this->lineExtensionAmount = $lineExtensionAmount; - return $this; - } - - /** - * @return TaxTotal - */ - public function getTaxTotal(): ?TaxTotal - { - return $this->taxTotal; - } - - /** - * @param TaxTotal $taxTotal - * @return InvoiceLine - */ - public function setTaxTotal(?TaxTotal $taxTotal): InvoiceLine - { - $this->taxTotal = $taxTotal; - return $this; - } - - /** - * @return string - */ - public function getNote(): ?string - { - return $this->note; - } - - /** - * @param string $note - * @return InvoiceLine - */ - public function setNote(?string $note): InvoiceLine - { - $this->note = $note; - return $this; - } - - /** - * @return InvoicePeriod - */ - public function getInvoicePeriod(): ?InvoicePeriod - { - return $this->invoicePeriod; - } - - /** - * @param InvoicePeriod $invoicePeriod - * @return InvoiceLine - */ - public function setInvoicePeriod(?InvoicePeriod $invoicePeriod) - { - $this->invoicePeriod = $invoicePeriod; - return $this; - } - - /** - * @return string - */ - public function getOrderLineReference(): ?OrderLineReference - { - return $this->orderLineReference; - } - - /** - * @param ?string $orderLineReference - * @return OrderLineReference - */ - public function setOrderLineReference(?OrderLineReference $orderLineReference): InvoiceLine - { - $this->orderLineReference = $orderLineReference; - return $this; - } - - /** - * @return Item - */ - public function getItem(): ?Item - { - return $this->item; - } - - /** - * @param Item $item - * @return InvoiceLine - */ - public function setItem(Item $item): InvoiceLine - { - $this->item = $item; - return $this; - } - - /** - * @return Price - */ - public function getPrice(): ?Price - { - return $this->price; - } - - /** - * @param Price $price - * @return InvoiceLine - */ - public function setPrice(?Price $price): InvoiceLine - { - $this->price = $price; - return $this; - } - - /** - * @return string - */ - public function getUnitCode(): ?string - { - return $this->unitCode; - } - - /** - * @param string $unitCode - * @return InvoiceLine - */ - public function setUnitCode(?string $unitCode): InvoiceLine - { - $this->unitCode = $unitCode; - return $this; - } - - /** - * @return string - */ - public function getUnitCodeListId(): ?string - { - return $this->unitCodeListId; - } - - /** - * @param string $unitCodeListId - * @return InvoiceLine - */ - public function setUnitCodeListId(?string $unitCodeListId) - { - $this->unitCodeListId = $unitCodeListId; - return $this; - } - - /** - * @return string - */ - public function getAccountingCostCode(): ?string - { - return $this->accountingCostCode; - } - - /** - * @param string $accountingCostCode - * @return InvoiceLine - */ - public function setAccountingCostCode(?string $accountingCostCode): InvoiceLine - { - $this->accountingCostCode = $accountingCostCode; - return $this; - } - - /** - * @return string - */ - public function getAccountingCost(): ?string - { - return $this->accountingCost; - } - - /** - * @param string $accountingCost - * @return InvoiceLine - */ - public function setAccountingCost(?string $accountingCost): InvoiceLine - { - $this->accountingCost = $accountingCost; - return $this; - } - - /** - * @return AllowanceCharge[] - */ - public function getAllowanceCharges(): ?array - { - return $this->allowanceCharges; - } - - /** - * @param AllowanceCharge[] $allowanceCharges - * @return InvoiceLine - */ - public function setAllowanceCharges(array $allowanceCharges): InvoiceLine - { - $this->allowanceCharges = $allowanceCharges; - return $this; - } - - /** - * The xmlSerialize method is called during xml writing. - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - $writer->write([ - Schema::CBC . 'ID' => $this->id - ]); - - if (!empty($this->getNote())) { - $writer->write([ - Schema::CBC . 'Note' => $this->getNote() - ]); - } - - $invoicedQuantityAttributes = [ - 'unitCode' => $this->unitCode, - ]; - - if (!empty($this->getUnitCodeListId())) { - $invoicedQuantityAttributes['unitCodeListID'] = $this->getUnitCodeListId(); - } - - $writer->write([ - 'name' => Schema::CBC . - ($this->isCreditNoteLine ? 'CreditedQuantity' : 'InvoicedQuantity'), - 'value' => NumberFormatter::format($this->invoicedQuantity), - 'attributes' => $invoicedQuantityAttributes - ]); - - $writer->write([ - 'name' => Schema::CBC . 'LineExtensionAmount', - 'value' => NumberFormatter::format($this->lineExtensionAmount ?? 0, 2), - 'attributes' => [ - 'currencyID' => Generator::$currencyID - ] - ]); - - if ($this->accountingCostCode !== null) { - $writer->write([ - Schema::CBC . 'AccountingCostCode' => $this->accountingCostCode - ]); - } - if ($this->accountingCost !== null) { - $writer->write([ - Schema::CBC . 'AccountingCost' => $this->accountingCost - ]); - } - if ($this->invoicePeriod !== null) { - $writer->write([ - Schema::CAC . 'InvoicePeriod' => $this->invoicePeriod - ]); - } - if ($this->orderLineReference !== null) { - $writer->write([ - Schema::CAC . 'OrderLineReference' => $this->orderLineReference - ]); - } - if ($this->allowanceCharges !== null) { - foreach ($this->allowanceCharges as $allowanceCharge) { - $writer->write([ - Schema::CAC . 'AllowanceCharge' => $allowanceCharge - ]); - } - } - if ($this->taxTotal !== null) { - $writer->write([ - Schema::CAC . 'TaxTotal' => $this->taxTotal - ]); - } - - if ($this->item !== null) { - $writer->write([ - Schema::CAC . 'Item' => $this->item, - ]); - } - - if ($this->price !== null) { - $writer->write([ - Schema::CAC . 'Price' => $this->price - ]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/InvoicePeriod.php b/vendor/num-num/ubl-invoice/src/InvoicePeriod.php deleted file mode 100644 index ccc719a5c..000000000 --- a/vendor/num-num/ubl-invoice/src/InvoicePeriod.php +++ /dev/null @@ -1,109 +0,0 @@ -startDate; - } - - /** - * @param DateTime $startDate - * @return InvoicePeriod - */ - public function setStartDate(?DateTime $startDate): InvoicePeriod - { - $this->startDate = $startDate; - return $this; - } - - /** - * @return DateTime - */ - public function getEndDate(): ?DateTime - { - return $this->endDate; - } - - /** - * @param DateTime $endDate - * @return InvoicePeriod - */ - public function setEndDate(?DateTime $endDate): InvoicePeriod - { - $this->endDate = $endDate; - return $this; - } - - /** - * @return int - */ - public function getDescriptionCode(): ?int - { - return $this->descriptionCode; - } - - /** - * @param Integer $descriptionCode - * @return InvoicePeriod - */ - public function setDescriptionCode(?int $descriptionCode): InvoicePeriod - { - $this->descriptionCode = $descriptionCode; - return $this; - } - - /** - * The validate function that is called during xml writing to valid the data of the object. - * - * @throws InvalidArgumentException An error with information about required data that is missing to write the XML - * @return void - */ - public function validate() - { - if ($this->descriptionCode === null && ($this->startDate === null && $this->endDate === null)) { - throw new InvalidArgumentException('Missing startDate or endDate or descriptionCode'); - } - } - - /** - * The xmlSerialize method is called during xml writing. - * - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - $this->validate(); - - if ($this->startDate != null) { - $writer->write([ - Schema::CBC . 'StartDate' => $this->startDate->format('Y-m-d'), - ]); - } - if ($this->endDate != null) { - $writer->write([ - Schema::CBC . 'EndDate' => $this->endDate->format('Y-m-d'), - ]); - } - if ($this->descriptionCode !== null) { - $writer->write([ - Schema::CBC . 'DescriptionCode' => $this->descriptionCode, - ]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/InvoiceTypeCode.php b/vendor/num-num/ubl-invoice/src/InvoiceTypeCode.php deleted file mode 100644 index 55bbdeca1..000000000 --- a/vendor/num-num/ubl-invoice/src/InvoiceTypeCode.php +++ /dev/null @@ -1,17 +0,0 @@ -description; - } - - /** - * @param string $description - * @return Item - */ - public function setDescription(?string $description): Item - { - $this->description = $description; - return $this; - } - - /** - * @return mixed - */ - public function getName(): ?string - { - return $this->name; - } - - /** - * @param mixed $name - * @return Item - */ - public function setName(?string $name): Item - { - $this->name = $name; - return $this; - } - - /** - * @return mixed - */ - public function getSellersItemIdentification(): ?string - { - return $this->sellersItemIdentification; - } - - /** - * @param mixed $sellersItemIdentification - * @return Item - */ - public function setSellersItemIdentification(?string $sellersItemIdentification): Item - { - $this->sellersItemIdentification = $sellersItemIdentification; - return $this; - } - - /** - * @return mixed - */ - public function getStandardItemIdentification(): ?string - { - return $this->standardItemIdentification; - } - - /** - * @param mixed $standardItemIdentification - * @return Item - */ - public function setStandardItemIdentification(?string $standardItemIdentification, $attributes = null): Item - { - $this->standardItemIdentification = $standardItemIdentification; - if (isset($attributes)) { - $this->standardItemIdentificationAttributes = $attributes; - } - return $this; - } - - /** - * @return CommodityClassification - */ - public function getCommodityClassification(): ?CommodityClassification - { - return $this->commodityClassification; - } - - /** - * @param mixed $commodityClassification - * @return Item - */ - public function setCommodityClassification(CommodityClassification $commodityClassification): Item - { - $this->commodityClassification = $commodityClassification; - return $this; - } - - /** - * @return mixed - */ - public function getBuyersItemIdentification(): ?string - { - return $this->buyersItemIdentification; - } - - /** - * @param mixed $buyersItemIdentification - * @return Item - */ - public function setBuyersItemIdentification(?string $buyersItemIdentification): Item - { - $this->buyersItemIdentification = $buyersItemIdentification; - return $this; - } - - /** - * @return ClassifiedTaxCategory - */ - public function getClassifiedTaxCategory(): ?ClassifiedTaxCategory - { - return $this->classifiedTaxCategory; - } - - /** - * @param ClassifiedTaxCategory $classifiedTaxCategory - * @return Item - */ - public function setClassifiedTaxCategory(?ClassifiedTaxCategory $classifiedTaxCategory): Item - { - $this->classifiedTaxCategory = $classifiedTaxCategory; - return $this; - } - - /** - * The xmlSerialize method is called during xml writing. - * - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - if (!empty($this->getDescription())) { - $writer->write([ - Schema::CBC . 'Description' => $this->description - ]); - } - - $writer->write([ - Schema::CBC . 'Name' => $this->name - ]); - - if (!empty($this->getBuyersItemIdentification())) { - $writer->write([ - Schema::CAC . 'BuyersItemIdentification' => [ - Schema::CBC . 'ID' => $this->buyersItemIdentification - ], - ]); - } - - if (!empty($this->getSellersItemIdentification())) { - $writer->write([ - Schema::CAC . 'SellersItemIdentification' => [ - Schema::CBC . 'ID' => $this->sellersItemIdentification - ], - ]); - } - - if (!empty($this->getStandardItemIdentification())) { - $writer->write([ - Schema::CAC . 'StandardItemIdentification' => [ - Schema::CBC . 'ID' => [ - 'value' => $this->standardItemIdentification, - 'attributes' => $this->standardItemIdentificationAttributes - ] - ] - ]); - } - - if (!empty($this->getCommodityClassification())) { - $writer->write([ - Schema::CAC . 'CommodityClassification' => $this->commodityClassification - ]); - } - - if (!empty($this->getClassifiedTaxCategory())) { - $writer->write([ - Schema::CAC . 'ClassifiedTaxCategory' => $this->classifiedTaxCategory - ]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/LegalEntity.php b/vendor/num-num/ubl-invoice/src/LegalEntity.php deleted file mode 100644 index 7e296b863..000000000 --- a/vendor/num-num/ubl-invoice/src/LegalEntity.php +++ /dev/null @@ -1,99 +0,0 @@ -registrationName; - } - - /** - * @param string $registrationName - * @return LegalEntity - */ - public function setRegistrationName(?string $registrationName): LegalEntity - { - $this->registrationName = $registrationName; - return $this; - } - - /** - * @return string - */ - public function getCompanyId(): ?string - { - return $this->companyId; - } - - /** - * @param string $companyId - * @return LegalEntity - */ - public function setCompanyId(?string $companyId, $attributes = null): LegalEntity - { - $this->companyId = $companyId; - if (isset($attributes)) { - $this->companyIdAttributes = $attributes; - } - return $this; - } - - /** - * - * @param string $legalForm - * @return LegalEntity - */ - public function setCompanyLegalForm(?string $legalForm, $attributes = null) : LegalEntity - { - $this->companyLegalForm = $legalForm; - if (isset($attributes)) { - $this->companyLegalFormAttributes = $attributes; - } - return $this; - } - - /** - * The xmlSerialize method is called during xml writing. - * - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - $writer->write([ - Schema::CBC . 'RegistrationName' => $this->registrationName, - ]); - if ($this->companyId !== null) { - $writer->write([ - [ - 'name' => Schema::CBC . 'CompanyID', - 'value' => $this->companyId, - 'attributes' => $this->companyIdAttributes, - ], - ]); - } - if ($this->companyLegalForm !== null) { - $writer->write([ - [ - 'name' => Schema::CBC . 'CompanyLegalForm', - 'value' => $this->companyLegalForm, - 'attributes' => $this->companyLegalFormAttributes - ] - ]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/LegalMonetaryTotal.php b/vendor/num-num/ubl-invoice/src/LegalMonetaryTotal.php deleted file mode 100644 index 2b6bdc917..000000000 --- a/vendor/num-num/ubl-invoice/src/LegalMonetaryTotal.php +++ /dev/null @@ -1,245 +0,0 @@ -lineExtensionAmount; - } - - /** - * @param float $lineExtensionAmount - * @return LegalMonetaryTotal - */ - public function setLineExtensionAmount(?float $lineExtensionAmount): LegalMonetaryTotal - { - $this->lineExtensionAmount = $lineExtensionAmount; - return $this; - } - - /** - * @return float - */ - public function getTaxExclusiveAmount(): ?float - { - return $this->taxExclusiveAmount; - } - - /** - * @param float $taxExclusiveAmount - * @return LegalMonetaryTotal - */ - public function setTaxExclusiveAmount(?float $taxExclusiveAmount): LegalMonetaryTotal - { - $this->taxExclusiveAmount = $taxExclusiveAmount; - return $this; - } - - /** - * @return float - */ - public function getTaxInclusiveAmount(): ?float - { - return $this->taxInclusiveAmount; - } - - /** - * @param float $taxInclusiveAmount - * @return LegalMonetaryTotal - */ - public function setTaxInclusiveAmount(?float $taxInclusiveAmount): LegalMonetaryTotal - { - $this->taxInclusiveAmount = $taxInclusiveAmount; - return $this; - } - - /** - * @return float - */ - public function getAllowanceTotalAmount(): ?float - { - return $this->allowanceTotalAmount; - } - - /** - * @param float $allowanceTotalAmount - * @return LegalMonetaryTotal - */ - public function setAllowanceTotalAmount(?float $allowanceTotalAmount): LegalMonetaryTotal - { - $this->allowanceTotalAmount = $allowanceTotalAmount; - return $this; - } - - /** - * @return float - */ - public function getChargeTotalAmount(): ?float - { - return $this->chargeTotalAmount; - } - - /** - * @param float $chargeTotalAmount - * @return LegalMonetaryTotal - */ - public function setChargeTotalAmount(?float $chargeTotalAmount): LegalMonetaryTotal - { - $this->chargeTotalAmount = $chargeTotalAmount; - return $this; - } - - /** - * @return ?float - */ - public function getPrepaidAmount(): ?float - { - return $this->prepaidAmount; - } - - /** - * @param ?float $prepaidAmount - * @return LegalMonetaryTotal - */ - public function setPrepaidAmount(?float $prepaidAmount): LegalMonetaryTotal - { - $this->prepaidAmount = $prepaidAmount; - return $this; - } - - /** - * @return float - */ - public function getPayableAmount(): ?float - { - return $this->payableAmount; - } - - /** - * @param float $payableAmount - * @return LegalMonetaryTotal - */ - public function setPayableAmount(?float $payableAmount): LegalMonetaryTotal - { - $this->payableAmount = $payableAmount; - return $this; - } - - public function getPayableRoundingAmount(): ?float - { - return $this->payableRoundingAmount; - } - - /** - * @param float|null $payableRoundingAmount - * @return LegalMonetaryTotal - */ - public function setPayableRoundingAmount(?float $payableRoundingAmount): LegalMonetaryTotal - { - $this->payableRoundingAmount = $payableRoundingAmount; - return $this; - } - - /** - * The xmlSerialize method is called during xml writing. - * - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - $writer->write([ - [ - 'name' => Schema::CBC . 'LineExtensionAmount', - 'value' => NumberFormatter::format($this->lineExtensionAmount, 2), - 'attributes' => [ - 'currencyID' => Generator::$currencyID - ] - - ], - [ - 'name' => Schema::CBC . 'TaxExclusiveAmount', - 'value' => NumberFormatter::format($this->taxExclusiveAmount, 2), - 'attributes' => [ - 'currencyID' => Generator::$currencyID - ] - - ], - [ - 'name' => Schema::CBC . 'TaxInclusiveAmount', - 'value' => NumberFormatter::format($this->taxInclusiveAmount, 2), - 'attributes' => [ - 'currencyID' => Generator::$currencyID - ] - - ], - [ - 'name' => Schema::CBC . 'AllowanceTotalAmount', - 'value' => NumberFormatter::format($this->allowanceTotalAmount,2), - 'attributes' => [ - 'currencyID' => Generator::$currencyID - ] - - ], - [ - 'name' => Schema::CBC . 'ChargeTotalAmount', - 'value' => NumberFormatter::format($this->chargeTotalAmount, 2), - 'attributes' => [ - 'currencyID' => Generator::$currencyID - ] - - ] - ]); - - if ($this->prepaidAmount !== null) { - $writer->write([ - [ - 'name' => Schema::CBC . 'PrepaidAmount', - 'value' => NumberFormatter::format($this->prepaidAmount, 2), - 'attributes' => [ - 'currencyID' => Generator::$currencyID - ] - ] - ]); - } - - if ($this->payableRoundingAmount !== null) { - $writer->write([ - [ - 'name' => Schema::CBC . 'PayableRoundingAmount', - 'value' => NumberFormatter::format($this->payableRoundingAmount, 2), - 'attributes' => [ - 'currencyID' => Generator::$currencyID - ] - ], - ]); - } - - $writer->write([ - [ - 'name' => Schema::CBC . 'PayableAmount', - 'value' => NumberFormatter::format($this->payableAmount, 2), - 'attributes' => [ - 'currencyID' => Generator::$currencyID - ] - ], - ]); - } -} diff --git a/vendor/num-num/ubl-invoice/src/NumberFormatter.php b/vendor/num-num/ubl-invoice/src/NumberFormatter.php deleted file mode 100644 index 0dff0a1e7..000000000 --- a/vendor/num-num/ubl-invoice/src/NumberFormatter.php +++ /dev/null @@ -1,33 +0,0 @@ -lineId; - } - - /** - * @param string $lineId - * @return OrderLineReference - */ - public function setLineId(?string $lineId): OrderLineReference - { - $this->lineId = $lineId; - return $this; - } - - /** - * The validate function that is called during xml writing to valid the data of the object. - * - * @return void - * @throws InvalidArgumentException An error with information about required data that is missing to write the XML - */ - public function validate() - { - if ($this->lineId === null) { - throw new InvalidArgumentException('Missing OrderLineReference LineID'); - } - } - - public function xmlSerialize(Writer $writer): void - { - $this->validate(); - - $writer->write([ - Schema::CBC . 'LineID' => $this->lineId - ]); - } -} diff --git a/vendor/num-num/ubl-invoice/src/OrderReference.php b/vendor/num-num/ubl-invoice/src/OrderReference.php deleted file mode 100644 index 4645368ee..000000000 --- a/vendor/num-num/ubl-invoice/src/OrderReference.php +++ /dev/null @@ -1,89 +0,0 @@ -id; - } - - /** - * @param string $id - * @return OrderReference - */ - public function setId(string $id): OrderReference - { - $this->id = $id; - return $this; - } - - /** - * @return string - */ - public function getSalesOrderId(): string - { - return $this->salesOrderId; - } - - /** - * @return DateTime - */ - public function getIssueDate(): ?DateTime - { - return $this->issueDate; - } - - /** - * @param DateTime $issueDate - * @return OrderReference - */ - public function setIssueDate(DateTime $issueDate): OrderReference - { - $this->issueDate = $issueDate; - return $this; - } - - /** - * @param string $salesOrderId - * @return OrderReference - */ - public function setSalesOrderId(string $salesOrderId): OrderReference - { - $this->salesOrderId = $salesOrderId; - return $this; - } - - /** - * The xmlSerialize method is called during xml writing. - * - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - if ($this->id !== null) { - $writer->write([Schema::CBC . 'ID' => $this->id]); - } - if ($this->salesOrderId !== null) { - $writer->write([Schema::CBC . 'SalesOrderID' => $this->salesOrderId]); - } - if ($this->issueDate !== null) { - $writer->write([ - Schema::CBC . 'IssueDate' => $this->issueDate->format('Y-m-d'), - ]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/Party.php b/vendor/num-num/ubl-invoice/src/Party.php deleted file mode 100644 index 2e0720389..000000000 --- a/vendor/num-num/ubl-invoice/src/Party.php +++ /dev/null @@ -1,276 +0,0 @@ -name; - } - - /** - * @param string $name - * @return Party - */ - public function setName(?string $name): Party - { - $this->name = $name; - return $this; - } - - /** - * @return string - */ - public function getPartyIdentificationId(): ?string - { - return $this->partyIdentificationId; - } - - /** - * @param string $partyIdentificationId - * @return Party - */ - public function setPartyIdentificationId(?string $partyIdentificationId): Party - { - $this->partyIdentificationId = $partyIdentificationId; - return $this; - } - - /** - * @return string - */ - public function getPartyIdentificationSchemeId(): ?string - { - return $this->partyIdentificationSchemeId; - } - - /** - * @param string $partyIdentificationSchemeId - * @return Party - */ - public function setPartyIdentificationSchemeId(?string $partyIdentificationSchemeId): Party - { - $this->partyIdentificationSchemeId = $partyIdentificationSchemeId; - return $this; - } - - /** - * @return string - */ - public function getPartyIdentificationSchemeName(): ?string - { - return $this->partyIdentificationSchemeName; - } - - /** - * @param string $partyIdentificationSchemeName - * @return Party - */ - public function setPartyIdentificationSchemeName(?string $partyIdentificationSchemeName): Party - { - $this->partyIdentificationSchemeName = $partyIdentificationSchemeName; - return $this; - } - - /** - * @return Address - */ - public function getPostalAddress(): ?Address - { - return $this->postalAddress; - } - - /** - * @param Address $postalAddress - * @return Party - */ - public function setPostalAddress(?Address $postalAddress): Party - { - $this->postalAddress = $postalAddress; - return $this; - } - - /** - * @return LegalEntity - */ - public function getLegalEntity(): ?LegalEntity - { - return $this->legalEntity; - } - - /** - * @param LegalEntity $legalEntity - * @return Party - */ - public function setLegalEntity(?LegalEntity $legalEntity): Party - { - $this->legalEntity = $legalEntity; - return $this; - } - - /** - * @return Address - */ - public function getPhysicalLocation(): ?Address - { - return $this->physicalLocation; - } - - /** - * @param Address $physicalLocation - * @return Party - */ - public function setPhysicalLocation(?Address $physicalLocation): Party - { - $this->physicalLocation = $physicalLocation; - return $this; - } - - /** - * @return PartyTaxScheme - */ - public function getPartyTaxScheme(): ?PartyTaxScheme - { - return $this->partyTaxScheme; - } - - /** - * @param PartyTaxScheme $partyTaxScheme - * @return Party - */ - public function setPartyTaxScheme(PartyTaxScheme $partyTaxScheme) - { - $this->partyTaxScheme = $partyTaxScheme; - return $this; - } - - /** - * @return Contact - */ - public function getContact(): ?Contact - { - return $this->contact; - } - - /** - * @param Contact $contact - * @return Party - */ - public function setContact(?Contact $contact): Party - { - $this->contact = $contact; - return $this; - } - - /** - * @param $endpointID - * @param int|string $schemeID See list at https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/ - * @return Party - */ - public function setEndpointID($endpointID, $schemeID): Party - { - $this->endpointID = $endpointID; - $this->endpointID_schemeID = $schemeID; - return $this; - } - - /** - * The xmlSerialize method is called during xml writing. - * - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - if ($this->endpointID !== null && $this->endpointID_schemeID !== null) { - $writer->write([ - [ - 'name' => Schema::CBC . 'EndpointID', - 'value' => $this->endpointID, - 'attributes' => [ - 'schemeID' => is_numeric($this->endpointID_schemeID) - ? sprintf('%04d', +$this->endpointID_schemeID) - : $this->endpointID_schemeID - ] - ] - ]); - } - - if ($this->partyIdentificationId !== null) { - $partyIdentificationAttributes = []; - - if (!empty($this->getPartyIdentificationSchemeId())) { - $partyIdentificationAttributes['schemeID'] = $this->getPartyIdentificationSchemeId(); - } - - if (!empty($this->getPartyIdentificationSchemeName())) { - $partyIdentificationAttributes['schemeName'] = $this->getPartyIdentificationSchemeName(); - } - - $writer->write([ - Schema::CAC . 'PartyIdentification' => [ - [ - 'name' => Schema::CBC . 'ID', - 'value' => $this->partyIdentificationId, - 'attributes' => $partyIdentificationAttributes - ] - ], - ]); - } - - if ($this->name !== null) { - $writer->write([ - Schema::CAC . 'PartyName' => [ - Schema::CBC . 'Name' => $this->name - ] - ]); - } - - $writer->write([ - Schema::CAC . 'PostalAddress' => $this->postalAddress - ]); - - if ($this->physicalLocation !== null) { - $writer->write([ - Schema::CAC . 'PhysicalLocation' => [Schema::CAC . 'Address' => $this->physicalLocation] - ]); - } - - if ($this->partyTaxScheme !== null) { - $writer->write([ - Schema::CAC . 'PartyTaxScheme' => $this->partyTaxScheme - ]); - } - - if ($this->legalEntity !== null) { - $writer->write([ - Schema::CAC . 'PartyLegalEntity' => $this->legalEntity - ]); - } - - if ($this->contact !== null) { - $writer->write([ - Schema::CAC . 'Contact' => $this->contact - ]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/PartyTaxScheme.php b/vendor/num-num/ubl-invoice/src/PartyTaxScheme.php deleted file mode 100644 index ecec3380a..000000000 --- a/vendor/num-num/ubl-invoice/src/PartyTaxScheme.php +++ /dev/null @@ -1,107 +0,0 @@ -registrationName; - } - - /** - * @param string $registrationName - * @return PartyTaxScheme - */ - public function setRegistrationName($registrationName): PartyTaxScheme - { - $this->registrationName = $registrationName; - return $this; - } - - /** - * @return string - */ - public function getCompanyId(): ?string - { - return $this->companyId; - } - - /** - * @param string $companyId - * @return PartyTaxScheme - */ - public function setCompanyId($companyId): PartyTaxScheme - { - $this->companyId = $companyId; - return $this; - } - - /** - * @param TaxScheme $taxScheme. - * @return mixed - */ - public function getTaxScheme(): ?TaxScheme - { - return $this->taxScheme; - } - - /** - * @param TaxScheme $taxScheme - * @return PartyTaxScheme - */ - public function setTaxScheme(TaxScheme $taxScheme): PartyTaxScheme - { - $this->taxScheme = $taxScheme; - return $this; - } - - /** - * The validate function that is called during xml writing to valid the data of the object. - * - * @return void - * @throws InvalidArgumentException An error with information about required data that is missing to write the XML - */ - public function validate() - { - if ($this->taxScheme === null) { - throw new InvalidArgumentException('Missing TaxScheme'); - } - } - - /** - * The xmlSerialize method is called during xml writing. - * - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - if ($this->registrationName !== null) { - $writer->write([ - Schema::CBC . 'RegistrationName' => $this->registrationName - ]); - } - if ($this->companyId !== null) { - $writer->write([ - Schema::CBC . 'CompanyID' => $this->companyId - ]); - } - - $writer->write([ - Schema::CAC . 'TaxScheme' => $this->taxScheme - ]); - } -} diff --git a/vendor/num-num/ubl-invoice/src/PayeeFinancialAccount.php b/vendor/num-num/ubl-invoice/src/PayeeFinancialAccount.php deleted file mode 100644 index 02e97acba..000000000 --- a/vendor/num-num/ubl-invoice/src/PayeeFinancialAccount.php +++ /dev/null @@ -1,91 +0,0 @@ -id; - } - - /** - * @param string $id - * @return PayeeFinancialAccount - */ - public function setId(?string $id): PayeeFinancialAccount - { - $this->id = $id; - return $this; - } - - /** - * @return string - */ - public function getName(): ?string - { - return $this->name; - } - - /** - * @param string $name - * @return PayeeFinancialAccount - */ - public function setName(?string $name): PayeeFinancialAccount - { - $this->name = $name; - return $this; - } - - /** - * @return FinancialInstitutionBranch - */ - public function getFinancialInstitutionBranch(): ?FinancialInstitutionBranch - { - return $this->financialInstitutionBranch; - } - - /** - * @param FinancialInstitutionBranch $financialInstitutionBranch - * @return PayeeFinancialAccount - */ - public function setFinancialInstitutionBranch(?FinancialInstitutionBranch $financialInstitutionBranch): PayeeFinancialAccount - { - $this->financialInstitutionBranch = $financialInstitutionBranch; - return $this; - } - - public function xmlSerialize(Writer $writer): void - { - $writer->write([ - 'name' => Schema::CBC . 'ID', - 'value' => $this->id, - 'attributes' => [ - //'schemeID' => 'IBAN' - ] - ]); - - if ($this->getName() !== null) { - $writer->write([ - Schema::CBC . 'Name' => $this->getName() - ]); - } - - if ($this->getFinancialInstitutionBranch() !== null) { - $writer->write([ - Schema::CAC . 'FinancialInstitutionBranch' => $this->getFinancialInstitutionBranch() - ]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/PaymentMeans.php b/vendor/num-num/ubl-invoice/src/PaymentMeans.php deleted file mode 100644 index a0b8c7096..000000000 --- a/vendor/num-num/ubl-invoice/src/PaymentMeans.php +++ /dev/null @@ -1,172 +0,0 @@ - 'UN/ECE 4461', - 'listName' => 'Payment Means', - 'listURI' => 'http://docs.oasis-open.org/ubl/os-UBL-2.0-update/cl/gc/default/PaymentMeansCode-2.0.gc']; - private $paymentDueDate; - private $instructionId; - private $instructionNote; - private $paymentId; - private $payeeFinancialAccount; - - /** - * @return string - */ - public function getPaymentMeansCode(): ?string - { - return $this->paymentMeansCode; - } - - /** - * @param string $paymentMeansCode - * @return PaymentMeans - */ - public function setPaymentMeansCode(?string $paymentMeansCode, $attributes = null): PaymentMeans - { - $this->paymentMeansCode = $paymentMeansCode; - if (isset($attributes)) { - $this->paymentMeansCodeAttributes = $attributes; - } - return $this; - } - - /** - * @return DateTime - */ - public function getPaymentDueDate(): ?DateTime - { - return $this->paymentDueDate; - } - - /** - * @param DateTime $paymentDueDate - * @return PaymentMeans - */ - public function setPaymentDueDate(?DateTime $paymentDueDate): PaymentMeans - { - $this->paymentDueDate = $paymentDueDate; - return $this; - } - - /** - * @return string - */ - public function getInstructionId(): ?string - { - return $this->instructionId; - } - - /** - * @param string $instructionId - * @return PaymentMeans - */ - public function setInstructionId(?string $instructionId): PaymentMeans - { - $this->instructionId = $instructionId; - return $this; - } - - /** - * @return string - */ - public function getInstructionNote(): ?string - { - return $this->instructionNote; - } - - /** - * @param string $instructionNote - * @return PaymentMeans - */ - public function setInstructionNote(?string $instructionNote): PaymentMeans - { - $this->instructionNote = $instructionNote; - return $this; - } - - /** - * @return string - */ - public function getPaymentId(): ?string - { - return $this->paymentId; - } - - /** - * @param string $paymentId - * @return PaymentMeans - */ - public function setPaymentId(?string $paymentId): PaymentMeans - { - $this->paymentId = $paymentId; - return $this; - } - - /** - * @return mixed - */ - public function getPayeeFinancialAccount(): ?PayeeFinancialAccount - { - return $this->payeeFinancialAccount; - } - - /** - * @param mixed $payeeFinancialAccount - * @return PaymentMeans - */ - public function setPayeeFinancialAccount(?PayeeFinancialAccount $payeeFinancialAccount): PaymentMeans - { - $this->payeeFinancialAccount = $payeeFinancialAccount; - return $this; - } - - public function xmlSerialize(Writer $writer): void - { - $writer->write([ - 'name' => Schema::CBC . 'PaymentMeansCode', - 'value' => $this->paymentMeansCode, - 'attributes' => $this->paymentMeansCodeAttributes - ]); - - if ($this->getPaymentDueDate() !== null) { - $writer->write([ - Schema::CBC . 'PaymentDueDate' => $this->getPaymentDueDate()->format('Y-m-d') - ]); - } - - if ($this->getInstructionId() !== null) { - $writer->write([ - Schema::CBC . 'InstructionID' => $this->getInstructionId() - ]); - } - - if ($this->getInstructionNote() !== null) { - $writer->write([ - Schema::CBC . 'InstructionNote' => $this->getInstructionNote() - ]); - } - - if ($this->getPaymentId() !== null) { - $writer->write([ - Schema::CBC . 'PaymentID' => $this->getPaymentId() - ]); - } - - if ($this->getPayeeFinancialAccount() !== null) { - $writer->write([ - Schema::CAC . 'PayeeFinancialAccount' => $this->getPayeeFinancialAccount() - ]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/PaymentTerms.php b/vendor/num-num/ubl-invoice/src/PaymentTerms.php deleted file mode 100644 index 4b99e98be..000000000 --- a/vendor/num-num/ubl-invoice/src/PaymentTerms.php +++ /dev/null @@ -1,113 +0,0 @@ -note; - } - - /** - * @param string $note - * @return PaymentTerms - */ - public function setNote(?string $note): PaymentTerms - { - $this->note = $note; - return $this; - } - - /** - * @return float - */ - public function getSettlementDiscountPercent(): ?float - { - return $this->settlementDiscountPercent; - } - - /** - * @param float $settlementDiscountPercent - * @return PaymentTerms - */ - public function setSettlementDiscountPercent(?float $settlementDiscountPercent): PaymentTerms - { - $this->settlementDiscountPercent = $settlementDiscountPercent; - return $this; - } - - /** - * @return float - */ - public function getAmount(): ?float - { - return $this->amount; - } - - /** - * @param float $amount - * @return PaymentTerms - */ - public function setAmount(?float $amount): PaymentTerms - { - $this->amount = $amount; - return $this; - } - - /** - * @return SettlementPeriod - */ - public function getSettlementPeriod(): ?SettlementPeriod - { - return $this->settlementPeriod; - } - - /** - * @param SettlementPeriod $settlementPeriod - * @return PaymentTerms - */ - public function setSettlementPeriod(?SettlementPeriod $settlementPeriod): PaymentTerms - { - $this->settlementPeriod = $settlementPeriod; - return $this; - } - - public function xmlSerialize(Writer $writer): void - { - if ($this->note !== null) { - $writer->write([ Schema::CBC . 'Note' => $this->note ]); - } - - if ($this->settlementDiscountPercent !== null) { - $writer->write([ Schema::CBC . 'SettlementDiscountPercent' => $this->settlementDiscountPercent ]); - } - - if ($this->amount !== null) { - $writer->write([ - [ - 'name' => Schema::CBC . 'Amount', - 'value' => NumberFormatter::format($this->amount, 2), - 'attributes' => [ - 'currencyID' => 'EUR' - ] - ] - ]); - } - - if ($this->settlementPeriod !== null) { - $writer->write([ Schema::CAC . 'SettlementPeriod' => $this->settlementPeriod ]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/Price.php b/vendor/num-num/ubl-invoice/src/Price.php deleted file mode 100644 index d454b413d..000000000 --- a/vendor/num-num/ubl-invoice/src/Price.php +++ /dev/null @@ -1,145 +0,0 @@ -priceAmount; - } - - /** - * @param float $priceAmount - * @return Price - */ - public function setPriceAmount(?float $priceAmount): Price - { - $this->priceAmount = $priceAmount; - return $this; - } - - /** - * @return float - */ - public function getBaseQuantity(): ?float - { - return $this->baseQuantity; - } - - /** - * @param float $baseQuantity - * @return Price - */ - public function setBaseQuantity(?float $baseQuantity): Price - { - $this->baseQuantity = $baseQuantity; - return $this; - } - - /** - * @return string - */ - public function getUnitCode(): ?string - { - return $this->unitCode; - } - - /** - * @param string $unitCode - * See also: src/UnitCode.php - * @return Price - */ - public function setUnitCode(?string $unitCode): Price - { - $this->unitCode = $unitCode; - return $this; - } - - - /** - * @return string - */ - public function getUnitCodeListId(): ?string - { - return $this->unitCodeListId; - } - - /** - * @param string $unitCodeListId - * @return Price - */ - public function setUnitCodeListId(?string $unitCodeListId): Price - { - $this->unitCodeListId = $unitCodeListId; - return $this; - } - - /** - * @return AllowanceCharge - */ - public function getAllowanceCharge(): ?AllowanceCharge - { - return $this->allowanceCharge; - } - - /** - * @param AllowanceCharge $allowanceCharge - * @return Price - */ - public function setAllowanceCharge(?AllowanceCharge $allowanceCharge): Price - { - $this->allowanceCharge = $allowanceCharge; - return $this; - } - - /** - * The xmlSerialize method is called during xml writing. - * - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - $baseQuantityAttributes = [ - 'unitCode' => $this->unitCode, - ]; - - if (!empty($this->getUnitCodeListId())) { - $baseQuantityAttributes['unitCodeListID'] = $this->getUnitCodeListId(); - } - - $writer->write([ - [ - 'name' => Schema::CBC . 'PriceAmount', - 'value' => NumberFormatter::format($this->priceAmount, 2), - 'attributes' => [ - 'currencyID' => Generator::$currencyID - ] - ], - [ - 'name' => Schema::CBC . 'BaseQuantity', - 'value' => NumberFormatter::format($this->baseQuantity), - 'attributes' => $baseQuantityAttributes - ] - ]); - - if ($this->allowanceCharge !== null) { - $writer->write([ - Schema::CAC . 'AllowanceCharge' => $this->allowanceCharge, - ]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/ProjectReference.php b/vendor/num-num/ubl-invoice/src/ProjectReference.php deleted file mode 100644 index a6e3d16c9..000000000 --- a/vendor/num-num/ubl-invoice/src/ProjectReference.php +++ /dev/null @@ -1,43 +0,0 @@ -id; - } - - /** - * @param string $id - * @return ProjectReference - */ - public function setId(string $id): ProjectReference - { - $this->id = $id; - return $this; - } - - /** - * The xmlSerialize method is called during xml writing. - * - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - if ($this->id !== null) { - $writer->write([Schema::CBC . 'ID' => $this->id]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/Schema.php b/vendor/num-num/ubl-invoice/src/Schema.php deleted file mode 100644 index 4a5097864..000000000 --- a/vendor/num-num/ubl-invoice/src/Schema.php +++ /dev/null @@ -1,9 +0,0 @@ -startDate; - } - - /** - * @param DateTime $startDate - * @return SettlementPeriod - */ - public function setStartDate(DateTime $startDate): SettlementPeriod - { - $this->startDate = $startDate; - return $this; - } - - /** - * @return DateTime - */ - public function getEndDate(): ?DateTime - { - return $this->endDate; - } - - /** - * @param DateTime $endDate - * @return SettlementPeriod - */ - public function setEndDate(DateTime $endDate): SettlementPeriod - { - $this->endDate = $endDate; - return $this; - } - - /** - * The validate function that is called during xml writing to valid the data of the object. - * - * @throws InvalidArgumentException An error with information about required data that is missing to write the XML - * @return void - */ - public function validate() - { - if ($this->startDate === null) { - throw new InvalidArgumentException('Missing startDate'); - } - if ($this->endDate === null) { - throw new InvalidArgumentException('Missing endDate'); - } - } - - /** - * The xmlSerialize method is called during xml writing. - * - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - $this->validate(); - - $writer->write([ - Schema::CBC . 'StartDate' => $this->startDate->format('Y-m-d'), - Schema::CBC . 'EndDate' => $this->endDate->format('Y-m-d'), - ]); - - $writer->write([ - [ - 'name' => Schema::CBC . 'DurationMeasure', - 'value' => $this->endDate->diff($this->startDate)->format('%d'), - 'attributes' => [ - 'unitCode' => 'DAY' - ] - ] - ]); - } -} diff --git a/vendor/num-num/ubl-invoice/src/TaxCategory.php b/vendor/num-num/ubl-invoice/src/TaxCategory.php deleted file mode 100644 index a8c1c6bc4..000000000 --- a/vendor/num-num/ubl-invoice/src/TaxCategory.php +++ /dev/null @@ -1,208 +0,0 @@ - UNCL5305::UNCL5305, - 'schemeName' => 'Duty or tax or fee category' - ]; - private $name; - private $percent; - private $taxScheme; - private $taxExemptionReason; - private $taxExemptionReasonCode; - - /** - * @return string - */ - public function getId(): ?string - { - if (!empty($this->id)) { - return $this->id; - } - - // Default behaviour, overrrule by using setId() - if ($this->getPercent() !== null) { - return ($this->getPercent() > 0) - ? UNCL5305::STANDARD_RATE - : UNCL5305::ZERO_RATED_GOODS; - } - - return null; - } - - /** - * @param string $id - * @param array $attributes - * @return TaxCategory - */ - public function setId(?string $id, $attributes = null): TaxCategory - { - $this->id = $id; - if (isset($attributes)) { - $this->idAttributes = $attributes; - } - return $this; - } - - /** - * @return string - */ - public function getName(): ?string - { - return $this->name; - } - - /** - * @param string $name - * @return TaxCategory - */ - public function setName(?string $name): TaxCategory - { - $this->name = $name; - return $this; - } - - /** - * @return string - */ - public function getPercent(): ?float - { - return $this->percent; - } - - /** - * @param string $percent - * @return TaxCategory - */ - public function setPercent(?float $percent): TaxCategory - { - $this->percent = $percent; - return $this; - } - - /** - * @return string - */ - public function getTaxScheme(): ?TaxScheme - { - return $this->taxScheme; - } - - /** - * @param TaxScheme $taxScheme - * @return TaxCategory - */ - public function setTaxScheme(?TaxScheme $taxScheme): TaxCategory - { - $this->taxScheme = $taxScheme; - return $this; - } - - /** - * @return string - */ - public function getTaxExemptionReason(): ?string - { - return $this->taxExemptionReason; - } - - /** - * @param string $taxExemptionReason - * @return TaxCategory - */ - public function setTaxExemptionReason(?string $taxExemptionReason): TaxCategory - { - $this->taxExemptionReason = $taxExemptionReason; - return $this; - } - - /** - * @return string - */ - public function getTaxExemptionReasonCode(): ?string - { - return $this->taxExemptionReasonCode; - } - - /** - * @param string $taxExemptionReason - * @return TaxCategory - */ - public function setTaxExemptionReasonCode(?string $taxExemptionReasonCode): TaxCategory - { - $this->taxExemptionReasonCode = $taxExemptionReasonCode; - return $this; - } - - /** - * The validate function that is called during xml writing to valid the data of the object. - * - * @throws InvalidArgumentException An error with information about required data that is missing to write the XML - * @return void - */ - public function validate() - { - if ($this->getId() === null) { - throw new InvalidArgumentException('Missing taxcategory id'); - } - } - - /** - * The xmlSerialize method is called during xml writing. - * - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - $this->validate(); - - $writer->write([ - [ - 'name' => Schema::CBC . 'ID', - 'value' => $this->getId(), - 'attributes' => $this->idAttributes, - ], - ]); - - if ($this->name !== null) { - $writer->write([ - Schema::CBC . 'Name' => $this->name, - ]); - } - if ($this->percent !== null) { - $writer->write([ - Schema::CBC . 'Percent' => number_format($this->percent, 2, '.', ''), - ]); - } - - if ($this->taxExemptionReasonCode !== null) { - $writer->write([ - Schema::CBC . 'TaxExemptionReasonCode' => $this->taxExemptionReasonCode, - ]); - } - - if ($this->taxExemptionReason !== null) { - $writer->write([ - Schema::CBC . 'TaxExemptionReason' => $this->taxExemptionReason, - ]); - } - - if ($this->taxScheme !== null) { - $writer->write([Schema::CAC . 'TaxScheme' => $this->taxScheme]); - } else { - $writer->write([ - Schema::CAC . 'TaxScheme' => null, - ]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/TaxScheme.php b/vendor/num-num/ubl-invoice/src/TaxScheme.php deleted file mode 100644 index 5229eb1b6..000000000 --- a/vendor/num-num/ubl-invoice/src/TaxScheme.php +++ /dev/null @@ -1,114 +0,0 @@ -id; - } - - /** - * @param string $id - * @return TaxScheme - */ - public function setId(string $id): TaxScheme - { - $this->id = $id; - return $this; - } - - /** - * @return string - */ - public function getName(): ?string - { - return $this->name; - } - - /** - * @param string $name - * @return TaxScheme - */ - public function setName(?string $name) - { - $this->name = $name; - return $this; - } - - /** - * @return string - */ - public function getTaxTypeCode(): ?string - { - return $this->taxTypeCode; - } - - /** - * @param string $taxTypeCode - * @return TaxScheme - */ - public function setTaxTypeCode(?string $taxTypeCode) - { - $this->taxTypeCode = $taxTypeCode; - return $this; - } - - /** - * @return string - */ - public function getCurrencyCode(): ?string - { - return $this->currencyCode; - } - - /** - * @param string $currencyCode - * @return TaxScheme - */ - public function setCurrencyCode(?string $currencyCode) - { - $this->currencyCode = $currencyCode; - return $this; - } - - /** - * The xmlSerialize method is called during xml writing. - * - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - $writer->write([ - Schema::CBC . 'ID' => $this->id - ]); - if ($this->name !== null) { - $writer->write([ - Schema::CBC . 'Name' => $this->name - ]); - } - if ($this->taxTypeCode !== null) { - $writer->write([ - Schema::CBC . 'TaxTypeCode' => $this->taxTypeCode - ]); - } - if ($this->currencyCode !== null) { - $writer->write([ - Schema::CBC . 'CurrencyCode' => $this->currencyCode - ]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/TaxSubTotal.php b/vendor/num-num/ubl-invoice/src/TaxSubTotal.php deleted file mode 100644 index 022374b83..000000000 --- a/vendor/num-num/ubl-invoice/src/TaxSubTotal.php +++ /dev/null @@ -1,146 +0,0 @@ -taxableAmount; - } - - /** - * @param mixed $taxableAmount - * @return TaxSubTotal - */ - public function setTaxableAmount(?float $taxableAmount): TaxSubTotal - { - $this->taxableAmount = $taxableAmount; - return $this; - } - - /** - * @return mixed - */ - public function getTaxAmount(): ?float - { - return $this->taxAmount; - } - - /** - * @param mixed $taxAmount - * @return TaxSubTotal - */ - public function setTaxAmount(?float $taxAmount): TaxSubTotal - { - $this->taxAmount = $taxAmount; - return $this; - } - - /** - * @return TaxCategory - */ - public function getTaxCategory(): ?TaxCategory - { - return $this->taxCategory; - } - - /** - * @param TaxCategory $taxCategory - * @return TaxSubTotal - */ - public function setTaxCategory(TaxCategory $taxCategory): TaxSubTotal - { - $this->taxCategory = $taxCategory; - return $this; - } - - /** - * @return float - */ - public function getPercent(): ?float - { - return $this->percent; - } - - /** - * @param float $percent - * @return TaxSubTotal - */ - public function setPercent(?float $percent): TaxSubTotal - { - $this->percent = $percent; - return $this; - } - - /** - * The validate function that is called during xml writing to valid the data of the object. - * - * @throws InvalidArgumentException An error with information about required data that is missing to write the XML - * @return void - */ - public function validate() - { - if ($this->taxableAmount === null) { - throw new InvalidArgumentException('Missing taxsubtotal taxableAmount'); - } - - if ($this->taxAmount === null) { - throw new InvalidArgumentException('Missing taxsubtotal taxamount'); - } - - if ($this->taxCategory === null) { - throw new InvalidArgumentException('Missing taxsubtotal taxcategory'); - } - } - - /** - * The xmlSerialize method is called during xml writing. - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - $this->validate(); - - $writer->write([ - [ - 'name' => Schema::CBC . 'TaxableAmount', - 'value' => NumberFormatter::format($this->taxableAmount, 2), - 'attributes' => [ - 'currencyID' => Generator::$currencyID - ] - ], - [ - 'name' => Schema::CBC . 'TaxAmount', - 'value' => NumberFormatter::format($this->taxAmount, 2), - 'attributes' => [ - 'currencyID' => Generator::$currencyID - ] - ] - ]); - - if ($this->percent !== null) { - $writer->write([ - Schema::CBC . 'Percent' => $this->percent - ]); - } - - $writer->write([ - Schema::CAC . 'TaxCategory' => $this->taxCategory - ]); - } -} diff --git a/vendor/num-num/ubl-invoice/src/TaxTotal.php b/vendor/num-num/ubl-invoice/src/TaxTotal.php deleted file mode 100644 index b8f37bc72..000000000 --- a/vendor/num-num/ubl-invoice/src/TaxTotal.php +++ /dev/null @@ -1,87 +0,0 @@ -taxAmount; - } - - /** - * @param mixed $taxAmount - * @return TaxTotal - */ - public function setTaxAmount(?float $taxAmount): TaxTotal - { - $this->taxAmount = $taxAmount; - return $this; - } - - /** - * @return array - */ - public function getTaxSubTotals(): array - { - return $this->taxSubTotals; - } - - /** - * @param TaxSubTotal $taxSubTotal - * @return TaxTotal - */ - public function addTaxSubTotal(TaxSubTotal $taxSubTotal): TaxTotal - { - $this->taxSubTotals[] = $taxSubTotal; - return $this; - } - - /** - * The validate function that is called during xml writing to valid the data of the object. - * - * @throws InvalidArgumentException An error with information about required data that is missing to write the XML - * @return void - */ - public function validate() - { - if ($this->taxAmount === null) { - throw new InvalidArgumentException('Missing taxtotal taxamount'); - } - } - - /** - * The xmlSerialize method is called during xml writing. - * @param Writer $writer - * @return void - */ - public function xmlSerialize(Writer $writer): void - { - $this->validate(); - - $writer->write([ - [ - 'name' => Schema::CBC . 'TaxAmount', - 'value' => NumberFormatter::format($this->taxAmount, 2), - 'attributes' => [ - 'currencyID' => Generator::$currencyID - ] - ], - ]); - - foreach ($this->taxSubTotals as $taxSubTotal) { - $writer->write([Schema::CAC . 'TaxSubtotal' => $taxSubTotal]); - } - } -} diff --git a/vendor/num-num/ubl-invoice/src/UNCL4461.php b/vendor/num-num/ubl-invoice/src/UNCL4461.php deleted file mode 100644 index 5e8038afb..000000000 --- a/vendor/num-num/ubl-invoice/src/UNCL4461.php +++ /dev/null @@ -1,93 +0,0 @@ -setIdentificationCode('BE'); - - // Full address - $address = (new \NumNum\UBL\Address()) - ->setStreetName('Korenmarkt') - ->setBuildingNumber(1) - ->setCityName('Gent') - ->setPostalZone('9000') - ->setCountry($country); - - // Supplier company node - $supplierCompany = (new \NumNum\UBL\Party()) - ->setName('Supplier Company Name') - ->setPhysicalLocation($address) - ->setPostalAddress($address); - - // Client company node - $clientCompany = (new \NumNum\UBL\Party()) - ->setName('My client') - ->setPostalAddress($address); - - $legalMonetaryTotal = (new \NumNum\UBL\LegalMonetaryTotal()) - ->setPayableAmount(10 + 2) - ->setAllowanceTotalAmount(0); - - // Tax scheme - $taxScheme = (new \NumNum\UBL\TaxScheme()) - ->setId(0); - - // Product - $productItem = (new \NumNum\UBL\Item()) - ->setName('Product Name') - ->setDescription('Product Description') - ->setSellersItemIdentification('SELLERID') - ->setBuyersItemIdentification('BUYERID'); - - // Price - $price = (new \NumNum\UBL\Price()) - ->setBaseQuantity(1) - ->setUnitCode(\NumNum\UBL\UnitCode::UNIT) - ->setPriceAmount(10); - - // Invoice Line tax totals - $lineTaxTotal = (new \NumNum\UBL\TaxTotal()) - ->setTaxAmount(2.1); - - // Invoice Line(s) - $creditNoteLine = (new \NumNum\UBL\CreditNoteLine()) - ->setId(0) - ->setItem($productItem) - ->setPrice($price) - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1); - - $creditNoteLines = [$creditNoteLine]; - - // Total Taxes - $taxCategory = (new \NumNum\UBL\TaxCategory()) - ->setId(0) - ->setName('VAT21%') - ->setPercent(.21) - ->setTaxScheme($taxScheme); - - $taxSubTotal = (new \NumNum\UBL\TaxSubTotal()) - ->setTaxableAmount(10) - ->setTaxAmount(2.1) - ->setTaxCategory($taxCategory); - - $taxTotal = (new \NumNum\UBL\TaxTotal()) - ->addTaxSubTotal($taxSubTotal) - ->setTaxAmount(2.1); - - $billingReference = (new \NumNum\UBL\BillingReference()) - ->setInvoiceDocumentReference((new \NumNum\UBL\InvoiceDocumentReference()) - ->setOriginalInvoiceId(1234) - ->setIssueDate(new \DateTime())); - - - // Invoice object - $creditNote = (new \NumNum\UBL\CreditNote()) - ->setId(1234) - ->setCopyIndicator(false) - ->setIssueDate(new \DateTime()) - ->setAccountingSupplierParty($supplierCompany) - ->setAccountingCustomerParty($clientCompany) - ->setBillingReference($billingReference) - ->setCreditNoteLines($creditNoteLines) - ->setLegalMonetaryTotal($legalMonetaryTotal) - ->setTaxTotal($taxTotal) - ->setInvoiceTypeCode(\NumNum\UBL\InvoiceTypeCode::CREDIT_NOTE); - - // Test created object - // Use \NumNum\UBL\Generator to generate an XML string - $generator = new \NumNum\UBL\Generator(); - $outputXMLString = $generator->creditNote($creditNote); - - // Create PHP Native DomDocument object, that can be - // used to validate the generate XML - $dom = new \DOMDocument; - $dom->loadXML($outputXMLString); - - $dom->save('./tests/SimpleCreditNoteTest.xml'); - - $this->assertEquals(true, $dom->schemaValidate($this->schema)); - } -} diff --git a/vendor/num-num/ubl-invoice/tests/ContractDocumentReferenceTest.php b/vendor/num-num/ubl-invoice/tests/ContractDocumentReferenceTest.php deleted file mode 100644 index c5935f71c..000000000 --- a/vendor/num-num/ubl-invoice/tests/ContractDocumentReferenceTest.php +++ /dev/null @@ -1,128 +0,0 @@ -setIdentificationCode('BE'); - - // Full address - $address = (new \NumNum\UBL\Address()) - ->setStreetName('Korenmarkt') - ->setBuildingNumber(1) - ->setCityName('Gent') - ->setPostalZone('9000') - ->setCountry($country); - - // Supplier company node - $supplierCompany = (new \NumNum\UBL\Party()) - ->setName('Supplier Company Name') - ->setPhysicalLocation($address) - ->setPostalAddress($address); - - // Client company node - $clientCompany = (new \NumNum\UBL\Party()) - ->setName('My client') - ->setPostalAddress($address); - - $legalMonetaryTotal = (new \NumNum\UBL\LegalMonetaryTotal()) - ->setPayableAmount(10 + 2) - ->setAllowanceTotalAmount(0); - - // Tax scheme - $taxScheme = (new \NumNum\UBL\TaxScheme()) - ->setId(0); - - // Product - $productItem = (new \NumNum\UBL\Item()) - ->setName('Product Name') - ->setDescription('Product Description'); - - // Price - $price = (new \NumNum\UBL\Price()) - ->setBaseQuantity(1) - ->setUnitCode(\NumNum\UBL\UnitCode::UNIT) - ->setPriceAmount(10); - - // Invoice Line tax totals - $lineTaxTotal = (new \NumNum\UBL\TaxTotal()) - ->setTaxAmount(2.1); - - // Invoice Line(s) - $invoiceLine = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setPrice($price) - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1); - - $invoiceLines = [$invoiceLine]; - - // Total Taxes - $taxCategory = (new \NumNum\UBL\TaxCategory()) - ->setId(0) - ->setName('VAT21%') - ->setPercent(.21) - ->setTaxScheme($taxScheme); - - $taxSubTotal = (new \NumNum\UBL\TaxSubTotal()) - ->setTaxableAmount(10) - ->setTaxAmount(2.1) - ->setTaxCategory($taxCategory); - - $taxTotal = (new \NumNum\UBL\TaxTotal()) - ->addTaxSubTotal($taxSubTotal) - ->setTaxAmount(2.1); - - $contractDocumentReference = (new \NumNum\UBL\ContractDocumentReference()) - ->setId("123Test"); - - $invoicePeriod = (new \NumNum\UBL\InvoicePeriod()) - ->setStartDate(new \DateTime('-31 days')) - ->setEndDate(new \DateTime()); - - // Invoice object - $invoice = (new \NumNum\UBL\Invoice()) - ->setUBLVersionID('2.2') - ->setId(1234) - ->setCopyIndicator(false) - ->setIssueDate(new \DateTime()) - ->setInvoiceTypeCode(\NumNum\UBL\InvoiceTypeCode::INVOICE) - ->setDueDate(new \DateTime()) - ->setAccountingSupplierParty($supplierCompany) - ->setAccountingCustomerParty($clientCompany) - ->setInvoiceLines($invoiceLines) - ->setLegalMonetaryTotal($legalMonetaryTotal) - ->setTaxTotal($taxTotal) - ->setContractDocumentReference($contractDocumentReference) - ->setBuyerReference("SomeReference") - ->setInvoicePeriod($invoicePeriod); - - // Test created object - // Use \NumNum\UBL\Generator to generate an XML string - $generator = new \NumNum\UBL\Generator(); - $outputXMLString = $generator->invoice($invoice); - - // Create PHP Native DomDocument object, that can be - // used to validate the generate XML - $dom = new \DOMDocument; - $dom->loadXML($outputXMLString); - - $dom->save('./tests/ContractDocumentReferenceTest.xml'); - - $this->assertEquals(true, $dom->schemaValidate($this->schema)); - } -} diff --git a/vendor/num-num/ubl-invoice/tests/DocumentTypeTest.php b/vendor/num-num/ubl-invoice/tests/DocumentTypeTest.php deleted file mode 100644 index 1cd711206..000000000 --- a/vendor/num-num/ubl-invoice/tests/DocumentTypeTest.php +++ /dev/null @@ -1,158 +0,0 @@ -setIdentificationCode('BE'); - - // Full address - $address = (new \NumNum\UBL\Address()) - ->setStreetName('Korenmarkt') - ->setBuildingNumber(1) - ->setCityName('Gent') - ->setPostalZone('9000') - ->setCountry($country); - - // Supplier company node - $supplierCompany = (new \NumNum\UBL\Party()) - ->setName('Supplier Company Name') - ->setPhysicalLocation($address) - ->setPostalAddress($address); - - // Client contact node - $clientContact = (new \NumNum\UBL\Contact()) - ->setName('Client name') - ->setElectronicMail('email@client.com') - ->setTelephone('0032 472 123 456') - ->setTelefax('0032 9 1234 567'); - - // Client company node - $clientCompany = (new \NumNum\UBL\Party()) - ->setName('My client') - ->setPostalAddress($address) - ->setContact($clientContact); - - $legalMonetaryTotal = (new \NumNum\UBL\LegalMonetaryTotal()) - ->setPayableAmount(10 + 2) - ->setAllowanceTotalAmount(0); - - // Tax scheme - $taxScheme = (new \NumNum\UBL\TaxScheme()) - ->setId(0); - - // Product - $productItem = (new \NumNum\UBL\Item()) - ->setName('Product Name') - ->setDescription('Product Description') - ->setSellersItemIdentification('SELLERID'); - - // Price - $price = (new \NumNum\UBL\Price()) - ->setBaseQuantity(1) - ->setUnitCode(\NumNum\UBL\UnitCode::UNIT) - ->setPriceAmount(10); - - // Invoice Line tax totals - $lineTaxTotal = (new \NumNum\UBL\TaxTotal()) - ->setTaxAmount(2.1); - - // InvoicePeriod - $invoicePeriod = (new \NumNum\UBL\InvoicePeriod()) - ->setStartDate(new \DateTime()); - - // Invoice Line(s) - $invoiceLines = []; - - $invoiceLines[] = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setInvoicePeriod($invoicePeriod) - ->setPrice($price) - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1); - - $invoiceLines[] = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setInvoicePeriod($invoicePeriod) - ->setPrice($price) - ->setAccountingCost('Product 123') - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1); - - $invoiceLines[] = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setInvoicePeriod($invoicePeriod) - ->setPrice($price) - ->setAccountingCostCode('Product 123') - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1); - - - // Total Taxes - $taxCategory = (new \NumNum\UBL\TaxCategory()) - ->setId(0) - ->setName('VAT21%') - ->setPercent(.21) - ->setTaxScheme($taxScheme); - - $taxSubTotal = (new \NumNum\UBL\TaxSubTotal()) - ->setTaxableAmount(10) - ->setTaxAmount(2.1) - ->setTaxCategory($taxCategory); - - - $taxTotal = (new \NumNum\UBL\TaxTotal()) - ->addTaxSubTotal($taxSubTotal) - ->setTaxAmount(2.1); - - // Attachment - $attachment = (new \NumNum\UBL\Attachment()) - ->setFilePath(__DIR__.DIRECTORY_SEPARATOR.'SampleInvoice.pdf'); - - $additionalDocumentReference = new \NumNum\UBL\AdditionalDocumentReference(); - $additionalDocumentReference->setId('SomeID'); - $additionalDocumentReference->setDocumentType("CommercialInvoice"); - - // Invoice object - $invoice = (new \NumNum\UBL\Invoice()) - ->setId(1234) - ->setCopyIndicator(false) - ->setIssueDate(new \DateTime()) - ->setAccountingSupplierParty($supplierCompany) - ->setAccountingCustomerParty($clientCompany) - ->setSupplierAssignedAccountID('10001') - ->setInvoiceLines($invoiceLines) - ->setLegalMonetaryTotal($legalMonetaryTotal) - ->setTaxTotal($taxTotal) - ->setAdditionalDocumentReference($additionalDocumentReference); - - // Test created object - // Use \NumNum\UBL\Generator to generate an XML string - $generator = new \NumNum\UBL\Generator(); - $outputXMLString = $generator->invoice($invoice); - - // Create PHP Native DomDocument object, that can be - // used to validate the generate XML - $dom = new \DOMDocument; - $dom->loadXML($outputXMLString); - - $dom->save('./tests/EmptyAttachmentTest.xml'); - - $this->assertEquals(true, $dom->schemaValidate($this->schema)); - } -} diff --git a/vendor/num-num/ubl-invoice/tests/DueDateTest.php b/vendor/num-num/ubl-invoice/tests/DueDateTest.php deleted file mode 100644 index 6f4459ecf..000000000 --- a/vendor/num-num/ubl-invoice/tests/DueDateTest.php +++ /dev/null @@ -1,118 +0,0 @@ -setIdentificationCode('BE'); - - // Full address - $address = (new \NumNum\UBL\Address()) - ->setStreetName('Korenmarkt') - ->setBuildingNumber(1) - ->setCityName('Gent') - ->setPostalZone('9000') - ->setCountry($country); - - // Supplier company node - $supplierCompany = (new \NumNum\UBL\Party()) - ->setName('Supplier Company Name') - ->setPhysicalLocation($address) - ->setPostalAddress($address); - - // Client company node - $clientCompany = (new \NumNum\UBL\Party()) - ->setName('My client') - ->setPostalAddress($address); - - $legalMonetaryTotal = (new \NumNum\UBL\LegalMonetaryTotal()) - ->setPayableAmount(10 + 2) - ->setAllowanceTotalAmount(0); - - // Tax scheme - $taxScheme = (new \NumNum\UBL\TaxScheme()) - ->setId(0); - - // Product - $productItem = (new \NumNum\UBL\Item()) - ->setName('Product Name') - ->setDescription('Product Description'); - - // Price - $price = (new \NumNum\UBL\Price()) - ->setBaseQuantity(1) - ->setUnitCode(\NumNum\UBL\UnitCode::UNIT) - ->setPriceAmount(10); - - // Invoice Line tax totals - $lineTaxTotal = (new \NumNum\UBL\TaxTotal()) - ->setTaxAmount(2.1); - - // Invoice Line(s) - $invoiceLine = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setPrice($price) - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1); - - $invoiceLines = [$invoiceLine]; - - // Total Taxes - $taxCategory = (new \NumNum\UBL\TaxCategory()) - ->setId(0) - ->setName('VAT21%') - ->setPercent(.21) - ->setTaxScheme($taxScheme); - - $taxSubTotal = (new \NumNum\UBL\TaxSubTotal()) - ->setTaxableAmount(10) - ->setTaxAmount(2.1) - ->setTaxCategory($taxCategory); - - $taxTotal = (new \NumNum\UBL\TaxTotal()) - ->addTaxSubTotal($taxSubTotal) - ->setTaxAmount(2.1); - - // Invoice object - $invoice = (new \NumNum\UBL\Invoice()) - ->setUBLVersionID('2.2') - ->setId(1234) - ->setCopyIndicator(false) - ->setIssueDate(new \DateTime()) - ->setInvoiceTypeCode(\NumNum\UBL\InvoiceTypeCode::INVOICE) - ->setDueDate(new \DateTime()) - ->setAccountingSupplierParty($supplierCompany) - ->setAccountingCustomerParty($clientCompany) - ->setInvoiceLines($invoiceLines) - ->setLegalMonetaryTotal($legalMonetaryTotal) - ->setTaxTotal($taxTotal); - - // Test created object - // Use \NumNum\UBL\Generator to generate an XML string - $generator = new \NumNum\UBL\Generator(); - $outputXMLString = $generator->invoice($invoice); - - // Create PHP Native DomDocument object, that can be - // used to validate the generate XML - $dom = new \DOMDocument; - $dom->loadXML($outputXMLString); - - $dom->save('./tests/DueDateTest.xml'); - - $this->assertEquals(true, $dom->schemaValidate($this->schema)); - } -} diff --git a/vendor/num-num/ubl-invoice/tests/EN16931Test.php b/vendor/num-num/ubl-invoice/tests/EN16931Test.php deleted file mode 100644 index 6be1d8d55..000000000 --- a/vendor/num-num/ubl-invoice/tests/EN16931Test.php +++ /dev/null @@ -1,202 +0,0 @@ -setId('VAT'); - - // Address country - $country = (new \NumNum\UBL\Country()) - ->setIdentificationCode('BE'); - - // Full address - $address = (new \NumNum\UBL\Address()) - ->setStreetName('Korenmarkt 1') - ->setAdditionalStreetName('Building A') - ->setCityName('Gent') - ->setPostalZone('9000') - ->setCountry($country); - - $financialInstitutionBranch = (new \NumNum\UBL\FinancialInstitutionBranch()) - ->setId('RABONL2U'); - - $payeeFinancialAccount = (new \NumNum\UBL\PayeeFinancialAccount()) - ->setFinancialInstitutionBranch($financialInstitutionBranch) - ->setName('Customer Account Holder') - ->setId('NL00RABO0000000000'); - - $paymentMeans = (new \NumNum\UBL\PaymentMeans()) - ->setPayeeFinancialAccount($payeeFinancialAccount) - ->setPaymentMeansCode(UNCL4461::DEBIT_TRANSFER, []) - ->setPaymentId('our invoice 1234'); - - // Supplier company node - $supplierLegalEntity = (new \NumNum\UBL\LegalEntity()) - ->setRegistrationName('Supplier Company Name') - ->setCompanyId('BE123456789'); - - $supplierPartyTaxScheme = (new \NumNum\UBL\PartyTaxScheme()) - ->setTaxScheme($taxScheme) - ->setCompanyId('BE123456789'); - - $supplierCompany = (new \NumNum\UBL\Party()) - ->setName('Supplier Company Name') - ->setLegalEntity($supplierLegalEntity) - ->setPartyTaxScheme($supplierPartyTaxScheme) - ->setPartyIdentificationId('BE123456789') - ->setPostalAddress($address); - - // Client company node - $clientLegalEntity = (new \NumNum\UBL\LegalEntity()) - ->setRegistrationName('Client Company Name') - ->setCompanyId('Client Company Registration'); - - $clientPartyTaxScheme = (new \NumNum\UBL\PartyTaxScheme()) - ->setTaxScheme($taxScheme) - ->setCompanyId('BE123456789'); - - $clientCompany = (new \NumNum\UBL\Party()) - ->setName('Client Company Name') - ->setLegalEntity($clientLegalEntity) - ->setPartyTaxScheme($clientPartyTaxScheme) - ->setPartyIdentificationId('BE123456789') - ->setPostalAddress($address); - - $legalMonetaryTotal = (new \NumNum\UBL\LegalMonetaryTotal()) - ->setPayableAmount(10 + 2.1) - ->setPayableRoundingAmount(0) - ->setTaxInclusiveAmount(10 + 2.1) - ->setLineExtensionAmount(10) - ->setTaxExclusiveAmount(10); - - $classifiedTaxCategory = (new \NumNum\UBL\ClassifiedTaxCategory()) - ->setId('S') - ->setPercent(21.00) - ->setTaxScheme($taxScheme); - - // Product - $productItem = (new \NumNum\UBL\Item()) - ->setName('Product Name') - ->setClassifiedTaxCategory($classifiedTaxCategory) - ->setDescription('Product Description'); - - // Price - $price = (new \NumNum\UBL\Price()) - ->setBaseQuantity(1) - ->setUnitCode(\NumNum\UBL\UnitCode::UNIT) - ->setPriceAmount(10); - - // Invoice Line tax totals - $lineTaxTotal = (new \NumNum\UBL\TaxTotal()) - ->setTaxAmount(2.1); - - // InvoicePeriod - $invoicePeriod = (new \NumNum\UBL\InvoicePeriod()) - ->setStartDate(new \DateTime()); - - // Invoice Line(s) - $invoiceLine = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setPrice($price) - ->setInvoicePeriod($invoicePeriod) - ->setLineExtensionAmount(10) - ->setInvoicedQuantity(1); - - $invoiceLines = [$invoiceLine]; - - // Total Taxes - $taxCategory = (new \NumNum\UBL\TaxCategory()) - ->setId('S', []) - ->setPercent(21.00) - ->setTaxScheme($taxScheme); - - $taxSubTotal = (new \NumNum\UBL\TaxSubTotal()) - ->setTaxableAmount(10) - ->setTaxAmount(2.1) - ->setTaxCategory($taxCategory); - - - $taxTotal = (new \NumNum\UBL\TaxTotal()) - ->addTaxSubTotal($taxSubTotal) - ->setTaxAmount(2.1); - - // Payment Terms - $paymentTerms = (new \NumNum\UBL\PaymentTerms()) - ->setNote('30 days net'); - - // Delivery - $deliveryLocation = (new \NumNum\UBL\Address()) - ->setCountry($country); - - $delivery = (new \NumNum\UBL\Delivery()) - ->setActualDeliveryDate(new \DateTime()) - ->setDeliveryLocation($deliveryLocation); - - $orderReference = (new \NumNum\UBL\OrderReference()) - ->setId('5009567') - ->setSalesOrderId('tRST-tKhM'); - - // Invoice object - $invoice = (new \NumNum\UBL\Invoice()) - ->setCustomizationID('urn:cen.eu:en16931:2017') - ->setId(1234) - ->setIssueDate(new \DateTime()) - ->setNote('invoice note') - ->setDelivery($delivery) - ->setAccountingSupplierParty($supplierCompany) - ->setAccountingCustomerParty($clientCompany) - ->setInvoiceLines($invoiceLines) - ->setLegalMonetaryTotal($legalMonetaryTotal) - ->setPaymentTerms($paymentTerms) - ->setInvoicePeriod($invoicePeriod) - ->setPaymentMeans([$paymentMeans]) - ->setBuyerReference('BUYER_REF') - ->setOrderReference($orderReference) - ->setTaxTotal($taxTotal); - - // Test created object - // Use \NumNum\UBL\Generator to generate an XML string - $generator = new \NumNum\UBL\Generator(); - $outputXMLString = $generator->invoice($invoice); - - // Create PHP Native DomDocument object, that can be - // used to validate the generate XML - $dom = new \DOMDocument; - $dom->loadXML($outputXMLString); - - $dom->save('./tests/EN16931Test.xml'); - - // $this->assertEquals(true, $dom->schemaValidate($this->schema)); - - // Use webservice at peppol.helger.com to verify the result - $wsdl = "http://peppol.helger.com/wsdvs?wsdl=1"; - $client = new \SoapClient($wsdl); - $response = $client->validate(['XML' => $outputXMLString, 'VESID' => 'eu.cen.en16931:ubl:1.3.1']); - - // Output validation warnings if present - if ($response->mostSevereErrorLevel == 'WARN' && isset($response->Result[1]->Item)) { - foreach ($response->Result[1]->Item as $responseWarning) { - // fwrite(STDERR, '*** '.$responseWarning->errorText."\n"); - fwrite(STDERR, '*** '.json_encode($responseWarning)."\n"); - } - } - - $this->assertEquals('SUCCESS', $response->mostSevereErrorLevel); - } -} diff --git a/vendor/num-num/ubl-invoice/tests/EmptyAttachmentTest.php b/vendor/num-num/ubl-invoice/tests/EmptyAttachmentTest.php deleted file mode 100644 index 986d2209c..000000000 --- a/vendor/num-num/ubl-invoice/tests/EmptyAttachmentTest.php +++ /dev/null @@ -1,161 +0,0 @@ -setIdentificationCode('BE'); - - // Full address - $address = (new \NumNum\UBL\Address()) - ->setStreetName('Korenmarkt') - ->setBuildingNumber(1) - ->setCityName('Gent') - ->setPostalZone('9000') - ->setCountry($country); - - // Supplier company node - $supplierCompany = (new \NumNum\UBL\Party()) - ->setName('Supplier Company Name') - ->setPhysicalLocation($address) - ->setPostalAddress($address); - - // Client contact node - $clientContact = (new \NumNum\UBL\Contact()) - ->setName('Client name') - ->setElectronicMail('email@client.com') - ->setTelephone('0032 472 123 456') - ->setTelefax('0032 9 1234 567'); - - // Client company node - $clientCompany = (new \NumNum\UBL\Party()) - ->setName('My client') - ->setPostalAddress($address) - ->setContact($clientContact); - - $legalMonetaryTotal = (new \NumNum\UBL\LegalMonetaryTotal()) - ->setPayableAmount(10 + 2) - ->setAllowanceTotalAmount(0); - - // Tax scheme - $taxScheme = (new \NumNum\UBL\TaxScheme()) - ->setId(0); - - // Product - $productItem = (new \NumNum\UBL\Item()) - ->setName('Product Name') - ->setDescription('Product Description') - ->setSellersItemIdentification('SELLERID'); - - // Price - $price = (new \NumNum\UBL\Price()) - ->setBaseQuantity(1) - ->setUnitCode(\NumNum\UBL\UnitCode::UNIT) - ->setPriceAmount(10); - - // Invoice Line tax totals - $lineTaxTotal = (new \NumNum\UBL\TaxTotal()) - ->setTaxAmount(2.1); - - // InvoicePeriod - $invoicePeriod = (new \NumNum\UBL\InvoicePeriod()) - ->setStartDate(new \DateTime()); - - // Invoice Line(s) - $invoiceLines = []; - - $invoiceLines[] = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setInvoicePeriod($invoicePeriod) - ->setPrice($price) - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1); - - $invoiceLines[] = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setInvoicePeriod($invoicePeriod) - ->setPrice($price) - ->setAccountingCost('Product 123') - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1); - - $invoiceLines[] = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setInvoicePeriod($invoicePeriod) - ->setPrice($price) - ->setAccountingCostCode('Product 123') - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1); - - - // Total Taxes - $taxCategory = (new \NumNum\UBL\TaxCategory()) - ->setId(0) - ->setName('VAT21%') - ->setPercent(.21) - ->setTaxScheme($taxScheme); - - $taxSubTotal = (new \NumNum\UBL\TaxSubTotal()) - ->setTaxableAmount(10) - ->setTaxAmount(2.1) - ->setTaxCategory($taxCategory); - - - $taxTotal = (new \NumNum\UBL\TaxTotal()) - ->addTaxSubTotal($taxSubTotal) - ->setTaxAmount(2.1); - - // Attachment - $attachment = (new \NumNum\UBL\Attachment()) - ->setFilePath(__DIR__.DIRECTORY_SEPARATOR.'SampleInvoice.pdf'); - - $additionalDocumentReference = new \NumNum\UBL\AdditionalDocumentReference(); - $additionalDocumentReference->setId('SomeID'); - $additionalDocumentReference->setDocumentTypeCode(130); - - // Not adding an attachment to AdditionalDocumentReference should not trigger an error - // $additionalDocumentReference->setAttachment($attachment); - - // Invoice object - $invoice = (new \NumNum\UBL\Invoice()) - ->setId(1234) - ->setCopyIndicator(false) - ->setIssueDate(new \DateTime()) - ->setAccountingSupplierParty($supplierCompany) - ->setAccountingCustomerParty($clientCompany) - ->setSupplierAssignedAccountID('10001') - ->setInvoiceLines($invoiceLines) - ->setLegalMonetaryTotal($legalMonetaryTotal) - ->setTaxTotal($taxTotal) - ->setAdditionalDocumentReference($additionalDocumentReference); - - // Test created object - // Use \NumNum\UBL\Generator to generate an XML string - $generator = new \NumNum\UBL\Generator(); - $outputXMLString = $generator->invoice($invoice); - - // Create PHP Native DomDocument object, that can be - // used to validate the generate XML - $dom = new \DOMDocument; - $dom->loadXML($outputXMLString); - - $dom->save('./tests/EmptyAttachmentTest.xml'); - - $this->assertEquals(true, $dom->schemaValidate($this->schema)); - } -} diff --git a/vendor/num-num/ubl-invoice/tests/MultiplePaymentMeansTest.php b/vendor/num-num/ubl-invoice/tests/MultiplePaymentMeansTest.php deleted file mode 100644 index 3ed3d326c..000000000 --- a/vendor/num-num/ubl-invoice/tests/MultiplePaymentMeansTest.php +++ /dev/null @@ -1,171 +0,0 @@ -setIdentificationCode('BE'); - - // Full address - $address = (new \NumNum\UBL\Address()) - ->setStreetName('Korenmarkt') - ->setBuildingNumber(1) - ->setCityName('Gent') - ->setPostalZone('9000') - ->setCountry($country); - - // Supplier company node - $supplierCompany = (new \NumNum\UBL\Party()) - ->setName('Supplier Company Name') - ->setPhysicalLocation($address) - ->setPostalAddress($address); - - // Client contact node - $clientContact = (new \NumNum\UBL\Contact()) - ->setName('Client name') - ->setElectronicMail('email@client.com') - ->setTelephone('0032 472 123 456') - ->setTelefax('0032 9 1234 567'); - - // Client company node - $clientCompany = (new \NumNum\UBL\Party()) - ->setName('My client') - ->setPostalAddress($address) - ->setContact($clientContact); - - $legalMonetaryTotal = (new \NumNum\UBL\LegalMonetaryTotal()) - ->setPayableAmount(10 + 2) - ->setAllowanceTotalAmount(0); - - // Tax scheme - $taxScheme = (new \NumNum\UBL\TaxScheme()) - ->setId(0); - - $commodityClassification = (new \NumNum\UBL\CommodityClassification()) - ->setItemClassificationCode('123456') - ->setItemClassificationListId('urn:ean.ucc:eanucc:2:2') - ->setItemClassificationListVersionId('16'); - - // Product - $productItem = (new \NumNum\UBL\Item()) - ->setName('Product Name') - ->setDescription('Product Description') - ->setSellersItemIdentification('SELLERID') - ->setCommodityClassification($commodityClassification); - - - // Price - $price = (new \NumNum\UBL\Price()) - ->setBaseQuantity(1) - ->setUnitCode(\NumNum\UBL\UnitCode::UNIT) - ->setPriceAmount(10); - - // Invoice Line tax totals - $lineTaxTotal = (new \NumNum\UBL\TaxTotal()) - ->setTaxAmount(2.1); - - // InvoicePeriod - $invoicePeriod = (new \NumNum\UBL\InvoicePeriod()) - ->setStartDate(new \DateTime()); - - // Invoice Line(s) - $invoiceLines = []; - - $invoiceLines[] = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setInvoicePeriod($invoicePeriod) - ->setPrice($price) - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1); - - $invoiceLines[] = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setInvoicePeriod($invoicePeriod) - ->setPrice($price) - ->setAccountingCost('Product 123') - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1); - - $invoiceLines[] = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setInvoicePeriod($invoicePeriod) - ->setPrice($price) - ->setAccountingCostCode('Product 123') - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1); - - - // Total Taxes - $taxCategory = (new \NumNum\UBL\TaxCategory()) - ->setId(0) - ->setName('VAT21%') - ->setPercent(.21) - ->setTaxScheme($taxScheme); - - $taxSubTotal = (new \NumNum\UBL\TaxSubTotal()) - ->setTaxableAmount(10) - ->setTaxAmount(2.1) - ->setTaxCategory($taxCategory); - - - $taxTotal = (new \NumNum\UBL\TaxTotal()) - ->addTaxSubTotal($taxSubTotal) - ->setTaxAmount(2.1); - - $paymentMeans = []; - - $payeeFinancialAccount = (new \NumNum\UBL\PayeeFinancialAccount)->setId('RO123456789012345'); - $paymentMeans[] = (new \NumNum\UBL\PaymentMeans()) - ->setPaymentMeansCode(31) - ->setPaymentDueDate(new \DateTime()) - ->setPayeeFinancialAccount($payeeFinancialAccount); - - $payeeFinancialAccount = (new \NumNum\UBL\PayeeFinancialAccount)->setId('RO544456789067890'); - $paymentMeans[] = (new \NumNum\UBL\PaymentMeans()) - ->setPaymentMeansCode(31) - ->setPaymentDueDate(new \DateTime()) - ->setPayeeFinancialAccount($payeeFinancialAccount); - - // Invoice object - $invoice = (new \NumNum\UBL\Invoice()) - ->setId(1234) - ->setCopyIndicator(false) - ->setIssueDate(new \DateTime()) - ->setAccountingSupplierParty($supplierCompany) - ->setAccountingCustomerParty($clientCompany) - ->setSupplierAssignedAccountID('10001') - ->setPaymentMeans($paymentMeans) - ->setInvoiceLines($invoiceLines) - ->setLegalMonetaryTotal($legalMonetaryTotal) - ->setTaxTotal($taxTotal); - - // Test created object - // Use \NumNum\UBL\Generator to generate an XML string - $generator = new \NumNum\UBL\Generator(); - $outputXMLString = $generator->invoice($invoice); - - // Create PHP Native DomDocument object, that can be - // used to validate the generate XML - $dom = new \DOMDocument; - $dom->loadXML($outputXMLString); - - $dom->save('./tests/MultiplePaymentMeansTest.xml'); - - $this->assertEquals(true, $dom->schemaValidate($this->schema)); - } -} diff --git a/vendor/num-num/ubl-invoice/tests/NumberFormatterTest.php b/vendor/num-num/ubl-invoice/tests/NumberFormatterTest.php deleted file mode 100644 index c195c12d6..000000000 --- a/vendor/num-num/ubl-invoice/tests/NumberFormatterTest.php +++ /dev/null @@ -1,35 +0,0 @@ -assertEqualsCanonicalizing($formattedNumber, $result); - } - - public function formattedNumbersProvider(): array - { - return [ - [0.0, '0', null], - [0.1, '0.1', null], - [0.1200500, '0.12005', null], - [1.2345678, '1.2345678', null], - [1.236789, '1.236789', null], - [1.236789, '1.24', 2], - [1, '1.00', 2], - [1.000, '1', null], - ]; - } -} diff --git a/vendor/num-num/ubl-invoice/tests/PartyIdentificationSchemeNameTest.php b/vendor/num-num/ubl-invoice/tests/PartyIdentificationSchemeNameTest.php deleted file mode 100644 index dc5737459..000000000 --- a/vendor/num-num/ubl-invoice/tests/PartyIdentificationSchemeNameTest.php +++ /dev/null @@ -1,128 +0,0 @@ -setIdentificationCode('BE'); - - // Full address - $address = (new \NumNum\UBL\Address()) - ->setStreetName('Korenmarkt') - ->setBuildingNumber(1) - ->setCityName('Gent') - ->setPostalZone('9000') - ->setCountry($country); - - // Supplier company node - $supplierCompany = (new \NumNum\UBL\Party()) - ->setName('Supplier Company Name') - ->setPhysicalLocation($address) - ->setPostalAddress($address) - ->setPartyIdentificationSchemeName("SomeScheme"); - - // Client company node - $clientCompany = (new \NumNum\UBL\Party()) - ->setName('My client') - ->setPostalAddress($address); - - $legalMonetaryTotal = (new \NumNum\UBL\LegalMonetaryTotal()) - ->setPayableAmount(10 + 2) - ->setAllowanceTotalAmount(0); - - // Tax scheme - $taxScheme = (new \NumNum\UBL\TaxScheme()) - ->setId(0); - - // Product - $productItem = (new \NumNum\UBL\Item()) - ->setName('Product Name') - ->setDescription('Product Description'); - - // Price - $price = (new \NumNum\UBL\Price()) - ->setBaseQuantity(1) - ->setUnitCode(\NumNum\UBL\UnitCode::UNIT) - ->setPriceAmount(10); - - // Invoice Line tax totals - $lineTaxTotal = (new \NumNum\UBL\TaxTotal()) - ->setTaxAmount(2.1); - - // Invoice Line(s) - $invoiceLine = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setPrice($price) - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1); - - $invoiceLines = [$invoiceLine]; - - // Total Taxes - $taxCategory = (new \NumNum\UBL\TaxCategory()) - ->setId(0) - ->setName('VAT21%') - ->setPercent(.21) - ->setTaxScheme($taxScheme); - - $taxSubTotal = (new \NumNum\UBL\TaxSubTotal()) - ->setTaxableAmount(10) - ->setTaxAmount(2.1) - ->setTaxCategory($taxCategory); - - $taxTotal = (new \NumNum\UBL\TaxTotal()) - ->addTaxSubTotal($taxSubTotal) - ->setTaxAmount(2.1); - - $contractDocumentReference = (new \NumNum\UBL\ContractDocumentReference()) - ->setId("123Test"); - - $invoicePeriod = (new \NumNum\UBL\InvoicePeriod()) - ->setStartDate(new \DateTime('-31 days')) - ->setEndDate(new \DateTime()); - - // Invoice object - $invoice = (new \NumNum\UBL\Invoice()) - ->setUBLVersionID('2.2') - ->setId(1234) - ->setCopyIndicator(false) - ->setIssueDate(new \DateTime()) - ->setInvoiceTypeCode(\NumNum\UBL\InvoiceTypeCode::INVOICE) - ->setDueDate(new \DateTime()) - ->setAccountingSupplierParty($supplierCompany) - ->setAccountingCustomerParty($clientCompany) - ->setInvoiceLines($invoiceLines) - ->setLegalMonetaryTotal($legalMonetaryTotal) - ->setTaxTotal($taxTotal) - ->setContractDocumentReference($contractDocumentReference) - ->setBuyerReference("SomeReference") - ->setInvoicePeriod($invoicePeriod); - - // Test created object - // Use \NumNum\UBL\Generator to generate an XML string - $generator = new \NumNum\UBL\Generator(); - $outputXMLString = $generator->invoice($invoice); - - // Create PHP Native DomDocument object, that can be - // used to validate the generate XML - $dom = new \DOMDocument; - $dom->loadXML($outputXMLString); - - $dom->save('./tests/PartyIdentificationSchemeNameTest.xml'); - - $this->assertEquals(true, $dom->schemaValidate($this->schema)); - } -} diff --git a/vendor/num-num/ubl-invoice/tests/ProjectReferenceTest.php b/vendor/num-num/ubl-invoice/tests/ProjectReferenceTest.php deleted file mode 100644 index 33c2dde81..000000000 --- a/vendor/num-num/ubl-invoice/tests/ProjectReferenceTest.php +++ /dev/null @@ -1,192 +0,0 @@ -setId('VAT'); - - // Address country - $country = (new \NumNum\UBL\Country()) - ->setIdentificationCode('BE'); - - // Full address - $address = (new \NumNum\UBL\Address()) - ->setStreetName('Korenmarkt 1') - ->setAdditionalStreetName('Building A') - ->setCityName('Gent') - ->setPostalZone('9000') - ->setCountry($country); - - $financialInstitutionBranch = (new \NumNum\UBL\FinancialInstitutionBranch()) - ->setId('RABONL2U'); - - $payeeFinancialAccount = (new \NumNum\UBL\PayeeFinancialAccount()) - ->setFinancialInstitutionBranch($financialInstitutionBranch) - ->setName('Customer Account Holder') - ->setId('NL00RABO0000000000'); - - $paymentMeans = (new \NumNum\UBL\PaymentMeans()) - ->setPayeeFinancialAccount($payeeFinancialAccount) - ->setPaymentMeansCode(UNCL4461::DEBIT_TRANSFER, []) - ->setPaymentId('our invoice 1234'); - - // Supplier company node - $supplierLegalEntity = (new \NumNum\UBL\LegalEntity()) - ->setRegistrationName('Supplier Company Name') - ->setCompanyId('BE123456789'); - - $supplierPartyTaxScheme = (new \NumNum\UBL\PartyTaxScheme()) - ->setTaxScheme($taxScheme) - ->setCompanyId('BE123456789'); - - $supplierCompany = (new \NumNum\UBL\Party()) - ->setName('Supplier Company Name') - ->setLegalEntity($supplierLegalEntity) - ->setPartyTaxScheme($supplierPartyTaxScheme) - ->setPartyIdentificationId('BE123456789') - ->setPostalAddress($address); - - // Client company node - $clientLegalEntity = (new \NumNum\UBL\LegalEntity()) - ->setRegistrationName('Client Company Name') - ->setCompanyId('Client Company Registration'); - - $clientPartyTaxScheme = (new \NumNum\UBL\PartyTaxScheme()) - ->setTaxScheme($taxScheme) - ->setCompanyId('BE123456789'); - - $clientCompany = (new \NumNum\UBL\Party()) - ->setName('Client Company Name') - ->setLegalEntity($clientLegalEntity) - ->setPartyTaxScheme($clientPartyTaxScheme) - ->setPartyIdentificationId('BE123456789') - ->setPostalAddress($address); - - $legalMonetaryTotal = (new \NumNum\UBL\LegalMonetaryTotal()) - ->setPayableAmount(10 + 2.1) - ->setAllowanceTotalAmount(0) - ->setTaxInclusiveAmount(10 + 2.1) - ->setLineExtensionAmount(10) - ->setTaxExclusiveAmount(10); - - $classifiedTaxCategory = (new \NumNum\UBL\ClassifiedTaxCategory()) - ->setId('S') - ->setPercent(21.00) - ->setTaxScheme($taxScheme); - - // Product - $productItem = (new \NumNum\UBL\Item()) - ->setName('Product Name') - ->setClassifiedTaxCategory($classifiedTaxCategory) - ->setDescription('Product Description'); - - // Price - $price = (new \NumNum\UBL\Price()) - ->setBaseQuantity(1) - ->setUnitCode(\NumNum\UBL\UnitCode::UNIT) - ->setPriceAmount(10); - - // Invoice Line tax totals - $lineTaxTotal = (new \NumNum\UBL\TaxTotal()) - ->setTaxAmount(2.1); - - // InvoicePeriod - $invoicePeriod = (new \NumNum\UBL\InvoicePeriod()) - ->setStartDate(new \DateTime()); - - // Invoice Line(s) - $invoiceLine = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setPrice($price) - ->setInvoicePeriod($invoicePeriod) - ->setLineExtensionAmount(10) - ->setInvoicedQuantity(1); - - $invoiceLines = [$invoiceLine]; - - // Total Taxes - $taxCategory = (new \NumNum\UBL\TaxCategory()) - ->setId('S', []) - ->setPercent(21.00) - ->setTaxScheme($taxScheme); - - $taxSubTotal = (new \NumNum\UBL\TaxSubTotal()) - ->setTaxableAmount(10) - ->setTaxAmount(2.1) - ->setTaxCategory($taxCategory); - - - $taxTotal = (new \NumNum\UBL\TaxTotal()) - ->addTaxSubTotal($taxSubTotal) - ->setTaxAmount(2.1); - - // Payment Terms - $paymentTerms = (new \NumNum\UBL\PaymentTerms()) - ->setNote('30 days net'); - - // Delivery - $deliveryLocation = (new \NumNum\UBL\Address()) - ->setCountry($country); - - $delivery = (new \NumNum\UBL\Delivery()) - ->setActualDeliveryDate(new \DateTime()) - ->setDeliveryLocation($deliveryLocation); - - $orderReference = (new \NumNum\UBL\OrderReference()) - ->setId('5009567') - ->setSalesOrderId('tRST-tKhM'); - - // Test Project Reference - $projectReference = (new \NumNum\UBL\ProjectReference()) - ->setId('Project1234'); - - // Invoice object - $invoice = (new \NumNum\UBL\Invoice()) - ->setCustomizationID('urn:cen.eu:en16931:2017') - ->setId(1234) - ->setIssueDate(new \DateTime()) - ->setNote('invoice note') - ->setDelivery($delivery) - ->setAccountingSupplierParty($supplierCompany) - ->setAccountingCustomerParty($clientCompany) - ->setInvoiceLines($invoiceLines) - ->setLegalMonetaryTotal($legalMonetaryTotal) - ->setPaymentTerms($paymentTerms) - ->setInvoicePeriod($invoicePeriod) - ->setPaymentMeans([$paymentMeans]) - ->setBuyerReference('BUYER_REF') - ->setOrderReference($orderReference) - ->setTaxTotal($taxTotal) - ->setProjectReference($projectReference); - - // Test created object - // Use \NumNum\UBL\Generator to generate an XML string - $generator = new \NumNum\UBL\Generator(); - $outputXMLString = $generator->invoice($invoice); - - // Create PHP Native DomDocument object, that can be - // used to validate the generate XML - $dom = new \DOMDocument; - $dom->loadXML($outputXMLString); - - $dom->save('./tests/ProjectReferenceTest.xml'); - - $this->assertEquals(true, $dom->schemaValidate($this->schema)); - } -} diff --git a/vendor/num-num/ubl-invoice/tests/SampleInvoice.pdf b/vendor/num-num/ubl-invoice/tests/SampleInvoice.pdf deleted file mode 100644 index f4cbb2086..000000000 Binary files a/vendor/num-num/ubl-invoice/tests/SampleInvoice.pdf and /dev/null differ diff --git a/vendor/num-num/ubl-invoice/tests/SimpleCreditNoteTest.php b/vendor/num-num/ubl-invoice/tests/SimpleCreditNoteTest.php deleted file mode 100644 index a64745e19..000000000 --- a/vendor/num-num/ubl-invoice/tests/SimpleCreditNoteTest.php +++ /dev/null @@ -1,117 +0,0 @@ -setIdentificationCode('BE'); - - // Full address - $address = (new \NumNum\UBL\Address()) - ->setStreetName('Korenmarkt') - ->setBuildingNumber(1) - ->setCityName('Gent') - ->setPostalZone('9000') - ->setCountry($country); - - // Supplier company node - $supplierCompany = (new \NumNum\UBL\Party()) - ->setName('Supplier Company Name') - ->setPhysicalLocation($address) - ->setPostalAddress($address); - - // Client company node - $clientCompany = (new \NumNum\UBL\Party()) - ->setName('My client') - ->setPostalAddress($address); - - $legalMonetaryTotal = (new \NumNum\UBL\LegalMonetaryTotal()) - ->setPayableAmount(10 + 2) - ->setAllowanceTotalAmount(0); - - // Tax scheme - $taxScheme = (new \NumNum\UBL\TaxScheme()) - ->setId(0); - - // Product - $productItem = (new \NumNum\UBL\Item()) - ->setName('Product Name') - ->setDescription('Product Description') - ->setSellersItemIdentification('SELLERID') - ->setBuyersItemIdentification('BUYERID'); - - // Price - $price = (new \NumNum\UBL\Price()) - ->setBaseQuantity(1) - ->setUnitCode(\NumNum\UBL\UnitCode::UNIT) - ->setPriceAmount(10); - - // Invoice Line tax totals - $lineTaxTotal = (new \NumNum\UBL\TaxTotal()) - ->setTaxAmount(2.1); - - // Invoice Line(s) - $creditNoteLine = (new \NumNum\UBL\CreditNoteLine()) - ->setId(0) - ->setItem($productItem) - ->setPrice($price) - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1); - - $creditNoteLines = [$creditNoteLine]; - - // Total Taxes - $taxCategory = (new \NumNum\UBL\TaxCategory()) - ->setId(0) - ->setName('VAT21%') - ->setPercent(.21) - ->setTaxScheme($taxScheme); - - $taxSubTotal = (new \NumNum\UBL\TaxSubTotal()) - ->setTaxableAmount(10) - ->setTaxAmount(2.1) - ->setTaxCategory($taxCategory); - - $taxTotal = (new \NumNum\UBL\TaxTotal()) - ->addTaxSubTotal($taxSubTotal) - ->setTaxAmount(2.1); - - // Invoice object - $creditNote = (new \NumNum\UBL\CreditNote()) - ->setId(1234) - ->setCopyIndicator(false) - ->setIssueDate(new \DateTime()) - ->setAccountingSupplierParty($supplierCompany) - ->setAccountingCustomerParty($clientCompany) - ->setCreditNoteLines($creditNoteLines) - ->setLegalMonetaryTotal($legalMonetaryTotal) - ->setTaxTotal($taxTotal) - ->setInvoiceTypeCode(\NumNum\UBL\InvoiceTypeCode::CREDIT_NOTE); - - // Test created object - // Use \NumNum\UBL\Generator to generate an XML string - $generator = new \NumNum\UBL\Generator(); - $outputXMLString = $generator->creditNote($creditNote); - - // Create PHP Native DomDocument object, that can be - // used to validate the generate XML - $dom = new \DOMDocument; - $dom->loadXML($outputXMLString); - - $dom->save('./tests/SimpleCreditNoteTest.xml'); - - $this->assertEquals(true, $dom->schemaValidate($this->schema)); - } -} diff --git a/vendor/num-num/ubl-invoice/tests/SimpleInvoiceTest.php b/vendor/num-num/ubl-invoice/tests/SimpleInvoiceTest.php deleted file mode 100644 index 69dc4dd3e..000000000 --- a/vendor/num-num/ubl-invoice/tests/SimpleInvoiceTest.php +++ /dev/null @@ -1,155 +0,0 @@ -setIdentificationCode('BE'); - - // Full address - $address = (new \NumNum\UBL\Address()) - ->setStreetName('Korenmarkt') - ->setBuildingNumber(1) - ->setCityName('Gent') - ->setPostalZone('9000') - ->setCountry($country); - - // Supplier company node - $supplierCompany = (new \NumNum\UBL\Party()) - ->setName('Supplier Company Name') - ->setPhysicalLocation($address) - ->setPostalAddress($address); - - // Client contact node - $clientContact = (new \NumNum\UBL\Contact()) - ->setName('Client name') - ->setElectronicMail('email@client.com') - ->setTelephone('0032 472 123 456') - ->setTelefax('0032 9 1234 567'); - - // Client company node - $clientCompany = (new \NumNum\UBL\Party()) - ->setName('My client') - ->setPostalAddress($address) - ->setContact($clientContact); - - $legalMonetaryTotal = (new \NumNum\UBL\LegalMonetaryTotal()) - ->setPayableAmount(10 + 2) - ->setAllowanceTotalAmount(0); - - // Tax scheme - $taxScheme = (new \NumNum\UBL\TaxScheme()) - ->setId(0); - - // Product - $productItem = (new \NumNum\UBL\Item()) - ->setName('Product Name') - ->setDescription('Product Description') - ->setSellersItemIdentification('SELLERID'); - - // Price - $price = (new \NumNum\UBL\Price()) - ->setBaseQuantity(1) - ->setUnitCode(\NumNum\UBL\UnitCode::UNIT) - ->setPriceAmount(10); - - // Invoice Line tax totals - $lineTaxTotal = (new \NumNum\UBL\TaxTotal()) - ->setTaxAmount(2.1); - - // InvoicePeriod - $invoicePeriod = (new \NumNum\UBL\InvoicePeriod()) - ->setStartDate(new \DateTime()); - - // Invoice Line(s) - $invoiceLines = []; - - $orderLineReference = (new \NumNum\UBL\OrderLineReference) - ->setLineId('#ABC123'); - - $invoiceLines[] = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setInvoicePeriod($invoicePeriod) - ->setPrice($price) - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1) - ->setOrderLineReference($orderLineReference); - - $invoiceLines[] = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setInvoicePeriod($invoicePeriod) - ->setPrice($price) - ->setAccountingCost('Product 123') - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1) - ->setOrderLineReference($orderLineReference); - - $invoiceLines[] = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setInvoicePeriod($invoicePeriod) - ->setPrice($price) - ->setAccountingCostCode('Product 123') - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1) - ->setOrderLineReference($orderLineReference); - - - // Total Taxes - $taxCategory = (new \NumNum\UBL\TaxCategory()) - ->setId(0) - ->setName('VAT21%') - ->setPercent(.21) - ->setTaxScheme($taxScheme); - - $taxSubTotal = (new \NumNum\UBL\TaxSubTotal()) - ->setTaxableAmount(10) - ->setTaxAmount(2.1) - ->setTaxCategory($taxCategory); - - - $taxTotal = (new \NumNum\UBL\TaxTotal()) - ->addTaxSubTotal($taxSubTotal) - ->setTaxAmount(2.1); - - // Invoice object - $invoice = (new \NumNum\UBL\Invoice()) - ->setId(1234) - ->setCopyIndicator(false) - ->setIssueDate(new \DateTime()) - ->setAccountingSupplierParty($supplierCompany) - ->setAccountingCustomerParty($clientCompany) - ->setSupplierAssignedAccountID('10001') - ->setInvoiceLines($invoiceLines) - ->setLegalMonetaryTotal($legalMonetaryTotal) - ->setTaxTotal($taxTotal); - - // Test created object - // Use \NumNum\UBL\Generator to generate an XML string - $generator = new \NumNum\UBL\Generator(); - $outputXMLString = $generator->invoice($invoice); - - // Create PHP Native DomDocument object, that can be - // used to validate the generate XML - $dom = new \DOMDocument; - $dom->loadXML($outputXMLString); - - $dom->save('./tests/SimpleInvoiceTest.xml'); - - $this->assertEquals(true, $dom->schemaValidate($this->schema)); - } -} diff --git a/vendor/num-num/ubl-invoice/tests/SimpleInvoiceWithFilePathPdfTest.php b/vendor/num-num/ubl-invoice/tests/SimpleInvoiceWithFilePathPdfTest.php deleted file mode 100644 index db47460cb..000000000 --- a/vendor/num-num/ubl-invoice/tests/SimpleInvoiceWithFilePathPdfTest.php +++ /dev/null @@ -1,162 +0,0 @@ -setIdentificationCode('BE'); - - // Full address - $address = (new \NumNum\UBL\Address()) - ->setStreetName('Korenmarkt') - ->setBuildingNumber(1) - ->setCityName('Gent') - ->setPostalZone('9000') - ->setCountry($country); - - // Supplier company node - $supplierCompany = (new \NumNum\UBL\Party()) - ->setName('Supplier Company Name') - ->setPhysicalLocation($address) - ->setPostalAddress($address); - - // Client contact node - $clientContact = (new \NumNum\UBL\Contact()) - ->setName('Client name') - ->setElectronicMail('email@client.com') - ->setTelephone('0032 472 123 456') - ->setTelefax('0032 9 1234 567'); - - // Client company node - $clientCompany = (new \NumNum\UBL\Party()) - ->setName('My client') - ->setPostalAddress($address) - ->setContact($clientContact); - - $legalMonetaryTotal = (new \NumNum\UBL\LegalMonetaryTotal()) - ->setPayableAmount(10 + 2) - ->setAllowanceTotalAmount(0); - - // Tax scheme - $taxScheme = (new \NumNum\UBL\TaxScheme()) - ->setId(0); - - // Product - $productItem = (new \NumNum\UBL\Item()) - ->setName('Product Name') - ->setDescription('Product Description') - ->setSellersItemIdentification('SELLERID'); - - // Price - $price = (new \NumNum\UBL\Price()) - ->setBaseQuantity(1) - ->setUnitCode(\NumNum\UBL\UnitCode::UNIT) - ->setPriceAmount(10); - - // Invoice Line tax totals - $lineTaxTotal = (new \NumNum\UBL\TaxTotal()) - ->setTaxAmount(2.1); - - // InvoicePeriod - $invoicePeriod = (new \NumNum\UBL\InvoicePeriod()) - ->setStartDate(new \DateTime()); - - // Invoice Line(s) - $invoiceLines = []; - - $orderLineReference = (new \NumNum\UBL\OrderLineReference) - ->setLineId('#ABC123'); - - $invoiceLines[] = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setInvoicePeriod($invoicePeriod) - ->setPrice($price) - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1) - ->setOrderLineReference($orderLineReference); - - $invoiceLines[] = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setInvoicePeriod($invoicePeriod) - ->setPrice($price) - ->setAccountingCost('Product 123') - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1) - ->setOrderLineReference($orderLineReference); - - $invoiceLines[] = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setInvoicePeriod($invoicePeriod) - ->setPrice($price) - ->setAccountingCostCode('Product 123') - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1) - ->setOrderLineReference($orderLineReference); - - - // Total Taxes - $taxCategory = (new \NumNum\UBL\TaxCategory()) - ->setId(0) - ->setName('VAT21%') - ->setPercent(.21) - ->setTaxScheme($taxScheme); - - $taxSubTotal = (new \NumNum\UBL\TaxSubTotal()) - ->setTaxableAmount(10) - ->setTaxAmount(2.1) - ->setTaxCategory($taxCategory); - - - $taxTotal = (new \NumNum\UBL\TaxTotal()) - ->addTaxSubTotal($taxSubTotal) - ->setTaxAmount(2.1); - - $attachment = (new \NumNum\UBL\Attachment()) - ->setFilePath(__DIR__.DIRECTORY_SEPARATOR.'SampleInvoice.pdf'); - - $additionalDocumentReference = (new \NumNum\UBL\AdditionalDocumentReference()) - ->setAttachment($attachment); - - // Invoice object - $invoice = (new \NumNum\UBL\Invoice()) - ->setId(1234) - ->setAdditionalDocumentReference($additionalDocumentReference) - ->setCopyIndicator(false) - ->setIssueDate(new \DateTime()) - ->setAccountingSupplierParty($supplierCompany) - ->setAccountingCustomerParty($clientCompany) - ->setSupplierAssignedAccountID('10001') - ->setInvoiceLines($invoiceLines) - ->setLegalMonetaryTotal($legalMonetaryTotal) - ->setTaxTotal($taxTotal); - - // Test created object - // Use \NumNum\UBL\Generator to generate an XML string - $generator = new \NumNum\UBL\Generator(); - $outputXMLString = $generator->invoice($invoice); - - // Create PHP Native DomDocument object, that can be - // used to validate the generate XML - $dom = new \DOMDocument; - $dom->loadXML($outputXMLString); - - $dom->save('./tests/SimpleInvoiceWithFilePathPdfTest.xml'); - - $this->assertEquals(true, $dom->schemaValidate($this->schema)); - } -} diff --git a/vendor/num-num/ubl-invoice/tests/SimpleInvoiceWithInlinePdfTest.php b/vendor/num-num/ubl-invoice/tests/SimpleInvoiceWithInlinePdfTest.php deleted file mode 100644 index bc11eeb38..000000000 --- a/vendor/num-num/ubl-invoice/tests/SimpleInvoiceWithInlinePdfTest.php +++ /dev/null @@ -1,167 +0,0 @@ -setIdentificationCode('BE'); - - // Full address - $address = (new \NumNum\UBL\Address()) - ->setStreetName('Korenmarkt') - ->setBuildingNumber(1) - ->setCityName('Gent') - ->setPostalZone('9000') - ->setCountry($country); - - // Supplier company node - $supplierCompany = (new \NumNum\UBL\Party()) - ->setName('Supplier Company Name') - ->setPhysicalLocation($address) - ->setPostalAddress($address); - - // Client contact node - $clientContact = (new \NumNum\UBL\Contact()) - ->setName('Client name') - ->setElectronicMail('email@client.com') - ->setTelephone('0032 472 123 456') - ->setTelefax('0032 9 1234 567'); - - // Client company node - $clientCompany = (new \NumNum\UBL\Party()) - ->setName('My client') - ->setPostalAddress($address) - ->setContact($clientContact); - - $legalMonetaryTotal = (new \NumNum\UBL\LegalMonetaryTotal()) - ->setPayableAmount(10 + 2) - ->setAllowanceTotalAmount(0); - - // Tax scheme - $taxScheme = (new \NumNum\UBL\TaxScheme()) - ->setId(0); - - // Product - $productItem = (new \NumNum\UBL\Item()) - ->setName('Product Name') - ->setDescription('Product Description') - ->setSellersItemIdentification('SELLERID'); - - // Price - $price = (new \NumNum\UBL\Price()) - ->setBaseQuantity(1) - ->setUnitCode(\NumNum\UBL\UnitCode::UNIT) - ->setPriceAmount(10); - - // Invoice Line tax totals - $lineTaxTotal = (new \NumNum\UBL\TaxTotal()) - ->setTaxAmount(2.1); - - // InvoicePeriod - $invoicePeriod = (new \NumNum\UBL\InvoicePeriod()) - ->setStartDate(new \DateTime()); - - // Invoice Line(s) - $invoiceLines = []; - - $orderLineReference = (new \NumNum\UBL\OrderLineReference) - ->setLineId('#ABC123'); - - $invoiceLines[] = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setInvoicePeriod($invoicePeriod) - ->setPrice($price) - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1) - ->setOrderLineReference($orderLineReference); - - $invoiceLines[] = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setInvoicePeriod($invoicePeriod) - ->setPrice($price) - ->setAccountingCost('Product 123') - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1) - ->setOrderLineReference($orderLineReference); - - $invoiceLines[] = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setInvoicePeriod($invoicePeriod) - ->setPrice($price) - ->setAccountingCostCode('Product 123') - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1) - ->setOrderLineReference($orderLineReference); - - - // Total Taxes - $taxCategory = (new \NumNum\UBL\TaxCategory()) - ->setId(0) - ->setName('VAT21%') - ->setPercent(.21) - ->setTaxScheme($taxScheme); - - $taxSubTotal = (new \NumNum\UBL\TaxSubTotal()) - ->setTaxableAmount(10) - ->setTaxAmount(2.1) - ->setTaxCategory($taxCategory); - - - $taxTotal = (new \NumNum\UBL\TaxTotal()) - ->addTaxSubTotal($taxSubTotal) - ->setTaxAmount(2.1); - - // Example if you have some inline or in-memory filestream/file contents - $fileStream = file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'SampleInvoice.pdf'); // this would be your file contents - - $base64EncodedFileStream = base64_encode($fileStream); - - $attachment = (new \NumNum\UBL\Attachment()) - ->setFileStream($base64EncodedFileStream, 'Invoice.pdf', 'application/pdf'); - - $additionalDocumentReference = (new \NumNum\UBL\AdditionalDocumentReference()) - ->setAttachment($attachment); - - // Invoice object - $invoice = (new \NumNum\UBL\Invoice()) - ->setId(1234) - ->setAdditionalDocumentReference($additionalDocumentReference) - ->setCopyIndicator(false) - ->setIssueDate(new \DateTime()) - ->setAccountingSupplierParty($supplierCompany) - ->setAccountingCustomerParty($clientCompany) - ->setSupplierAssignedAccountID('10001') - ->setInvoiceLines($invoiceLines) - ->setLegalMonetaryTotal($legalMonetaryTotal) - ->setTaxTotal($taxTotal); - - // Test created object - // Use \NumNum\UBL\Generator to generate an XML string - $generator = new \NumNum\UBL\Generator(); - $outputXMLString = $generator->invoice($invoice); - - // Create PHP Native DomDocument object, that can be - // used to validate the generate XML - $dom = new \DOMDocument; - $dom->loadXML($outputXMLString); - - $dom->save('./tests/SimpleInvoiceWithInlinePdfTest.xml'); - - $this->assertEquals(true, $dom->schemaValidate($this->schema)); - } -} diff --git a/vendor/num-num/ubl-invoice/tests/SimpleUBL22InvoiceTest.php b/vendor/num-num/ubl-invoice/tests/SimpleUBL22InvoiceTest.php deleted file mode 100644 index 458294c87..000000000 --- a/vendor/num-num/ubl-invoice/tests/SimpleUBL22InvoiceTest.php +++ /dev/null @@ -1,119 +0,0 @@ -setIdentificationCode('BE') - ->setListId('ISO3166-1:Alpha2'); - - // Full address - $address = (new \NumNum\UBL\Address()) - ->setStreetName('Korenmarkt') - ->setBuildingNumber(1) - ->setCityName('Gent') - ->setPostalZone('9000') - ->setCountry($country); - - // Supplier company node - $supplierCompany = (new \NumNum\UBL\Party()) - ->setName('Supplier Company Name') - ->setPhysicalLocation($address) - ->setPostalAddress($address); - - // Client company node - $clientCompany = (new \NumNum\UBL\Party()) - ->setName('My client') - ->setPostalAddress($address); - - $legalMonetaryTotal = (new \NumNum\UBL\LegalMonetaryTotal()) - ->setPayableAmount(10 + 2) - ->setAllowanceTotalAmount(0); - - // Tax scheme - $taxScheme = (new \NumNum\UBL\TaxScheme()) - ->setId(0); - - // Product - $productItem = (new \NumNum\UBL\Item()) - ->setName('Product Name') - ->setDescription('Product Description'); - - // Price - $price = (new \NumNum\UBL\Price()) - ->setBaseQuantity(1) - ->setUnitCode(\NumNum\UBL\UnitCode::UNIT) - ->setUnitCodeListId('UNECERec20') - ->setPriceAmount(10); - - // Invoice Line tax totals - $lineTaxTotal = (new \NumNum\UBL\TaxTotal()) - ->setTaxAmount(2.1); - - // Invoice Line(s) - $invoiceLine = (new \NumNum\UBL\InvoiceLine()) - ->setId(0) - ->setItem($productItem) - ->setUnitCode('C62') - ->setUnitCodeListID('UNECERec20') - ->setPrice($price) - ->setTaxTotal($lineTaxTotal) - ->setInvoicedQuantity(1); - - $invoiceLines = [$invoiceLine]; - - // Total Taxes - $taxCategory = (new \NumNum\UBL\TaxCategory()) - ->setId(0) - ->setName('VAT21%') - ->setPercent(.21) - ->setTaxScheme($taxScheme); - - $taxSubTotal = (new \NumNum\UBL\TaxSubTotal()) - ->setTaxableAmount(10) - ->setTaxAmount(2.1) - ->setTaxCategory($taxCategory); - - $taxTotal = (new \NumNum\UBL\TaxTotal()) - ->addTaxSubTotal($taxSubTotal) - ->setTaxAmount(2.1); - - // Invoice object - $invoice = (new \NumNum\UBL\Invoice()) - ->setUBLVersionID('2.2') - ->setId(1234) - ->setCopyIndicator(false) - ->setIssueDate(new \DateTime()) - ->setAccountingSupplierParty($supplierCompany) - ->setAccountingCustomerParty($clientCompany) - ->setInvoiceLines($invoiceLines) - ->setLegalMonetaryTotal($legalMonetaryTotal) - ->setTaxTotal($taxTotal); - - // Test created object - // Use \NumNum\UBL\Generator to generate an XML string - $generator = new \NumNum\UBL\Generator(); - $outputXMLString = $generator->invoice($invoice); - - // Create PHP Native DomDocument object, that can be - // used to validate the generate XML - $dom = new \DOMDocument; - $dom->loadXML($outputXMLString); - - $dom->save('./tests/SimpleUBL22InvoiceTest.xml'); - - $this->assertEquals(true, $dom->schemaValidate($this->schema)); - } -} diff --git a/vendor/sabre/uri/LICENSE b/vendor/sabre/uri/LICENSE deleted file mode 100644 index ae2c99290..000000000 --- a/vendor/sabre/uri/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (C) 2014-2019 fruux GmbH (https://fruux.com/) - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name Sabre nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/sabre/uri/composer.json b/vendor/sabre/uri/composer.json deleted file mode 100644 index 2d26c23b1..000000000 --- a/vendor/sabre/uri/composer.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "sabre/uri", - "description": "Functions for making sense out of URIs.", - "keywords": [ - "URI", - "URL", - "rfc3986" - ], - "homepage": "http://sabre.io/uri/", - "license": "BSD-3-Clause", - "require": { - "php": "^7.4 || ^8.0" - }, - "authors": [ - { - "name": "Evert Pot", - "email": "me@evertpot.com", - "homepage": "http://evertpot.com/", - "role": "Developer" - } - ], - "support": { - "forum": "https://groups.google.com/group/sabredav-discuss", - "source": "https://github.com/fruux/sabre-uri" - }, - "autoload": { - "files" : [ - "lib/functions.php" - ], - "psr-4" : { - "Sabre\\Uri\\" : "lib/" - } - }, - "autoload-dev": { - "psr-4": { - "Sabre\\Uri\\": "tests/Uri" - } - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.64", - "phpstan/phpstan": "^1.12", - "phpstan/phpstan-phpunit": "^1.4", - "phpstan/phpstan-strict-rules": "^1.6", - "phpstan/extension-installer": "^1.4", - "phpunit/phpunit" : "^9.6" - }, - "scripts": { - "phpstan": [ - "phpstan analyse lib tests" - ], - "cs-fixer": [ - "php-cs-fixer fix" - ], - "phpunit": [ - "phpunit --configuration tests/phpunit.xml" - ], - "test": [ - "composer phpstan", - "composer cs-fixer", - "composer phpunit" - ] - }, - "config": { - "allow-plugins": { - "phpstan/extension-installer": true - } - } -} diff --git a/vendor/sabre/uri/lib/InvalidUriException.php b/vendor/sabre/uri/lib/InvalidUriException.php deleted file mode 100644 index 7f37ca54e..000000000 --- a/vendor/sabre/uri/lib/InvalidUriException.php +++ /dev/null @@ -1,19 +0,0 @@ - 0) { - // If the path starts with a slash - if ('/' === $delta['path'][0]) { - $path = $delta['path']; - } else { - // Removing last component from base path. - $path = (string) $base['path']; - $length = strrpos($path, '/'); - if (false !== $length) { - $path = substr($path, 0, $length); - } - $path .= '/'.$delta['path']; - } - } else { - $path = $base['path'] ?? '/'; - if ('' === $path) { - $path = '/'; - } - } - // Removing .. and . - $pathParts = explode('/', $path); - $newPathParts = []; - foreach ($pathParts as $pathPart) { - switch ($pathPart) { - // case '' : - case '.': - break; - case '..': - array_pop($newPathParts); - break; - default: - $newPathParts[] = $pathPart; - break; - } - } - - $path = implode('/', $newPathParts); - - // If the source url ended with a /, we want to preserve that. - $newParts['path'] = 0 === strpos($path, '/') ? $path : '/'.$path; - // From PHP 8, no "?" query at all causes 'query' to be null. - // An empty query "http://example.com/foo?" causes 'query' to be the empty string - if (null !== $delta['query'] && '' !== $delta['query']) { - $newParts['query'] = $delta['query']; - } elseif (isset($base['query']) && null === $delta['host'] && null === $delta['path']) { - // Keep the old query if host and path didn't change - $newParts['query'] = $base['query']; - } - // From PHP 8, no "#" fragment at all causes 'fragment' to be null. - // An empty fragment "http://example.com/foo#" causes 'fragment' to be the empty string - if (null !== $delta['fragment'] && '' !== $delta['fragment']) { - $newParts['fragment'] = $delta['fragment']; - } - - return build($newParts); -} - -/** - * Takes a URI or partial URI as its argument, and normalizes it. - * - * After normalizing a URI, you can safely compare it to other URIs. - * This function will for instance convert a %7E into a tilde, according to - * rfc3986. - * - * It will also change a %3a into a %3A. - * - * @throws InvalidUriException - */ -function normalize(string $uri): string -{ - $parts = parse($uri); - - if (null !== $parts['path']) { - $pathParts = explode('/', ltrim($parts['path'], '/')); - $newPathParts = []; - foreach ($pathParts as $pathPart) { - switch ($pathPart) { - case '.': - // skip - break; - case '..': - // One level up in the hierarchy - array_pop($newPathParts); - break; - default: - // Ensuring that everything is correctly percent-encoded. - $newPathParts[] = rawurlencode(rawurldecode($pathPart)); - break; - } - } - $parts['path'] = '/'.implode('/', $newPathParts); - } - - if (null !== $parts['scheme']) { - $parts['scheme'] = strtolower($parts['scheme']); - $defaultPorts = [ - 'http' => '80', - 'https' => '443', - ]; - - if (null !== $parts['port'] && isset($defaultPorts[$parts['scheme']]) && $defaultPorts[$parts['scheme']] == $parts['port']) { - // Removing default ports. - unset($parts['port']); - } - // A few HTTP specific rules. - switch ($parts['scheme']) { - case 'http': - case 'https': - if (null === $parts['path']) { - // An empty path is equivalent to / in http. - $parts['path'] = '/'; - } - break; - } - } - - if (null !== $parts['host']) { - $parts['host'] = strtolower($parts['host']); - } - - return build($parts); -} - -/** - * Parses a URI and returns its individual components. - * - * This method largely behaves the same as PHP's parse_url, except that it will - * return an array with all the array keys, including the ones that are not - * set by parse_url, which makes it a bit easier to work with. - * - * Unlike PHP's parse_url, it will also convert any non-ascii characters to - * percent-encoded strings. PHP's parse_url corrupts these characters on OS X. - * - * In the return array, key "port" is an int value. Other keys have a string value. - * "Unused" keys have value null. - * - * @return array{scheme: string|null, host: string|null, path: string|null, port: positive-int|null, user: string|null, query: string|null, fragment: string|null} - * - * @throws InvalidUriException - */ -function parse(string $uri): array -{ - // Normally a URI must be ASCII. However, often it's not and - // parse_url might corrupt these strings. - // - // For that reason we take any non-ascii characters from the uri and - // uriencode them first. - $uri = preg_replace_callback( - '/[^[:ascii:]]/u', - function ($matches) { - return rawurlencode($matches[0]); - }, - $uri - ); - - if (null === $uri) { - throw new InvalidUriException('Invalid, or could not parse URI'); - } - - $result = parse_url($uri); - if (false === $result) { - $result = _parse_fallback($uri); - } else { - // Add empty host and leading slash to Windows file paths - // file:///C:/path or file:///C:\path - // Note: the regex fragment [a-zA-Z]:[\/\\\\].* end up being - // [a-zA-Z]:[\/\\].* - // The 4 backslash in a row are the way to get 2 backslash into the actual string - // that is used as the regex. The 2 backslash are then the way to get 1 backslash - // character into the character set "a forward slash or a backslash" - if (isset($result['scheme']) && 'file' === $result['scheme'] && isset($result['path']) - && 1 === preg_match('/^(? [a-zA-Z]:([\/\\\\].*)?)$/x', $result['path'])) { - $result['path'] = '/'.$result['path']; - $result['host'] = ''; - } - } - - /* - * phpstan is not able to process all the things that happen while this function - * constructs the result array. It only understands the $result is - * non-empty-array - * - * But the detail of the returned array is correctly specified in the PHPdoc - * above the function call. - * - * @phpstan-ignore-next-line - */ - return - $result + [ - 'scheme' => null, - 'host' => null, - 'path' => null, - 'port' => null, - 'user' => null, - 'query' => null, - 'fragment' => null, - ]; -} - -/** - * This function takes the components returned from PHP's parse_url, and uses - * it to generate a new uri. - * - * @param array $parts - */ -function build(array $parts): string -{ - $uri = ''; - - $authority = ''; - if (isset($parts['host'])) { - $authority = $parts['host']; - if (isset($parts['user'])) { - $authority = $parts['user'].'@'.$authority; - } - if (isset($parts['port'])) { - $authority = $authority.':'.$parts['port']; - } - } - - if (isset($parts['scheme'])) { - // If there's a scheme, there's also a host. - $uri = $parts['scheme'].':'; - } - if ('' !== $authority || (isset($parts['scheme']) && 'file' === $parts['scheme'])) { - // No scheme, but there is a host. - $uri .= '//'.$authority; - } - - if (isset($parts['path'])) { - $uri .= $parts['path']; - } - if (isset($parts['query'])) { - $uri .= '?'.$parts['query']; - } - if (isset($parts['fragment'])) { - $uri .= '#'.$parts['fragment']; - } - - return $uri; -} - -/** - * Returns the 'dirname' and 'basename' for a path. - * - * The reason there is a custom function for this purpose, is because - * basename() is locale aware (behaviour changes if C locale or a UTF-8 locale - * is used) and we need a method that just operates on UTF-8 characters. - * - * In addition basename and dirname are platform aware, and will treat - * backslash (\) as a directory separator on Windows. - * - * This method returns the 2 components as an array. - * - * If there is no dirname, it will return an empty string. Any / appearing at - * the end of the string is stripped off. - * - * @return list - */ -function split(string $path): array -{ - $matches = []; - if (1 === preg_match('/^(?:(?:(.*)(?:\/+))?([^\/]+))(?:\/?)$/u', $path, $matches)) { - return [$matches[1], $matches[2]]; - } - - return [null, null]; -} - -/** - * This function is another implementation of parse_url, except this one is - * fully written in PHP. - * - * The reason is that the PHP bug team is not willing to admit that there are - * bugs in the parse_url implementation. - * - * This function is only called if the main parse method fails. It's pretty - * crude and probably slow, so the original parse_url is usually preferred. - * - * @return array{scheme: string|null, host: string|null, path: string|null, port: positive-int|null, user: string|null, query: string|null, fragment: string|null} - * - * @throws InvalidUriException - */ -function _parse_fallback(string $uri): array -{ - // Normally a URI must be ASCII, however. However, often it's not and - // parse_url might corrupt these strings. - // - // For that reason we take any non-ascii characters from the uri and - // uriencode them first. - $uri = preg_replace_callback( - '/[^[:ascii:]]/u', - function ($matches) { - return rawurlencode($matches[0]); - }, - $uri - ); - - if (null === $uri) { - throw new InvalidUriException('Invalid, or could not parse URI'); - } - - $result = [ - 'scheme' => null, - 'host' => null, - 'port' => null, - 'user' => null, - 'path' => null, - 'fragment' => null, - 'query' => null, - ]; - - if (1 === preg_match('% ^([A-Za-z][A-Za-z0-9+-\.]+): %x', $uri, $matches)) { - $result['scheme'] = $matches[1]; - // Take what's left. - $uri = substr($uri, strlen($result['scheme']) + 1); - if (false === $uri) { - // There was nothing left. - $uri = ''; - } - } - - // Taking off a fragment part - if (false !== strpos($uri, '#')) { - list($uri, $result['fragment']) = explode('#', $uri, 2); - } - // Taking off the query part - if (false !== strpos($uri, '?')) { - list($uri, $result['query']) = explode('?', $uri, 2); - } - - if ('///' === substr($uri, 0, 3)) { - // The triple slash uris are a bit unusual, but we have special handling - // for them. - $path = substr($uri, 2); - if (false === $path) { - throw new \RuntimeException('The string cannot be false'); - } - $result['path'] = $path; - $result['host'] = ''; - } elseif ('//' === substr($uri, 0, 2)) { - // Uris that have an authority part. - $regex = '%^ - // - (?: (? [^:@]+) (: (? [^@]+)) @)? - (? ( [^:/]* | \[ [^\]]+ \] )) - (?: : (? [0-9]+))? - (? / .*)? - $%x'; - if (1 !== preg_match($regex, $uri, $matches)) { - throw new InvalidUriException('Invalid, or could not parse URI'); - } - if (isset($matches['host']) && '' !== $matches['host']) { - $result['host'] = $matches['host']; - } - if (isset($matches['port'])) { - $port = (int) $matches['port']; - if ($port > 0) { - $result['port'] = $port; - } - } - if (isset($matches['path'])) { - $result['path'] = $matches['path']; - } - if (isset($matches['user']) && '' !== $matches['user']) { - $result['user'] = $matches['user']; - } - if (isset($matches['pass']) && '' !== $matches['pass']) { - $result['pass'] = $matches['pass']; - } - } else { - $result['path'] = $uri; - } - - return $result; -} diff --git a/vendor/sabre/xml/LICENSE b/vendor/sabre/xml/LICENSE deleted file mode 100644 index c9faf409b..000000000 --- a/vendor/sabre/xml/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (C) 2009-2015 fruux GmbH (https://fruux.com/) - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name Sabre nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/sabre/xml/README.md b/vendor/sabre/xml/README.md deleted file mode 100644 index 9513a892d..000000000 --- a/vendor/sabre/xml/README.md +++ /dev/null @@ -1,26 +0,0 @@ -sabre/xml -========= - -![Build Status](https://github.com/sabre-io/xml/actions/workflows/ci.yml/badge.svg) - -The sabre/xml library is a specialized XML reader and writer. - -Documentation -------------- - -* [Introduction](http://sabre.io/xml/). -* [Installation](http://sabre.io/xml/install/). -* [Reading XML](http://sabre.io/xml/reading/). -* [Writing XML](http://sabre.io/xml/writing/). - -Major version 3 implements type declarations for input parameters, function returns, variables etc. It supports PHP 7.4 and PHP 8. When you upgrade to major version 3, if you extend classes etc., then you will need to make similar type declarations in your code. - -Support -------- - -Head over to the [SabreDAV mailing list](http://groups.google.com/group/sabredav-discuss) for any questions. - -Made at fruux -------------- - -This library is being developed by [fruux](https://fruux.com/). Drop us a line for commercial services or enterprise support. diff --git a/vendor/sabre/xml/composer.json b/vendor/sabre/xml/composer.json deleted file mode 100644 index faf06b3bd..000000000 --- a/vendor/sabre/xml/composer.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "sabre/xml", - "description" : "sabre/xml is an XML library that you may not hate.", - "keywords" : [ "XML", "XMLReader", "XMLWriter", "DOM" ], - "homepage" : "https://sabre.io/xml/", - "license" : "BSD-3-Clause", - "require" : { - "php" : "^7.4 || ^8.0", - "ext-xmlwriter" : "*", - "ext-xmlreader" : "*", - "ext-dom" : "*", - "lib-libxml" : ">=2.6.20", - "sabre/uri" : ">=2.0,<4.0.0" - }, - "authors" : [ - { - "name" : "Evert Pot", - "email" : "me@evertpot.com", - "homepage" : "http://evertpot.com/", - "role" : "Developer" - }, - { - "name": "Markus Staab", - "email": "markus.staab@redaxo.de", - "role" : "Developer" - } - ], - "support" : { - "forum" : "https://groups.google.com/group/sabredav-discuss", - "source" : "https://github.com/fruux/sabre-xml" - }, - "autoload" : { - "psr-4" : { - "Sabre\\Xml\\" : "lib/" - }, - "files": [ - "lib/Deserializer/functions.php", - "lib/Serializer/functions.php" - ] - }, - "autoload-dev" : { - "psr-4" : { - "Sabre\\Xml\\" : "tests/Sabre/Xml/" - } - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.64", - "phpstan/phpstan": "^1.12", - "phpunit/phpunit" : "^9.6" - }, - "scripts": { - "phpstan": [ - "phpstan analyse" - ], - "phpstan-baseline": [ - "phpstan analyse --generate-baseline phpstan-baseline.neon" - ], - "cs-fixer": [ - "PHP_CS_FIXER_IGNORE_ENV=true php-cs-fixer fix" - ], - "phpunit": [ - "phpunit --configuration tests/phpunit.xml" - ], - "test": [ - "composer phpstan", - "composer cs-fixer", - "composer phpunit" - ] - } -} diff --git a/vendor/sabre/xml/lib/ContextStackTrait.php b/vendor/sabre/xml/lib/ContextStackTrait.php deleted file mode 100644 index 7c082f5fb..000000000 --- a/vendor/sabre/xml/lib/ContextStackTrait.php +++ /dev/null @@ -1,116 +0,0 @@ - - */ - public array $elementMap = []; - - /** - * A contextUri pointing to the document being parsed / written. - * This uri may be used to resolve relative urls that may appear in the - * document. - * - * The reader and writer don't use this property, but as it's an extremely - * common use-case for parsing XML documents, it's added here as a - * convenience. - */ - public ?string $contextUri = null; - - /** - * This is a list of namespaces that you want to give default prefixes. - * - * You must make sure you create this entire list before starting to write. - * They should be registered on the root element. - * - * @phpstan-var array - */ - public array $namespaceMap = []; - - /** - * This is a list of custom serializers for specific classes. - * - * The writer may use this if you attempt to serialize an object with a - * class that does not implement XmlSerializable. - * - * Instead, it will look at this classmap to see if there is a custom - * serializer here. This is useful if you don't want your value objects - * to be responsible for serializing themselves. - * - * The keys in this classmap need to be fully qualified PHP class names, - * the values must be callbacks. The callbacks take two arguments. The - * writer class, and the value that must be written. - * - * function (Writer $writer, object $value) - * - * @phpstan-var array - */ - public array $classMap = []; - - /** - * Backups of previous contexts. - * - * @var list - */ - protected array $contextStack = []; - - /** - * Create a new "context". - * - * This allows you to safely modify the elementMap, contextUri or - * namespaceMap. After you're done, you can restore the old data again - * with popContext. - */ - public function pushContext(): void - { - $this->contextStack[] = [ - $this->elementMap, - $this->contextUri, - $this->namespaceMap, - $this->classMap, - ]; - } - - /** - * Restore the previous "context". - */ - public function popContext(): void - { - list( - $this->elementMap, - $this->contextUri, - $this->namespaceMap, - $this->classMap, - ) = array_pop($this->contextStack); - } -} diff --git a/vendor/sabre/xml/lib/Deserializer/functions.php b/vendor/sabre/xml/lib/Deserializer/functions.php deleted file mode 100644 index 90b943988..000000000 --- a/vendor/sabre/xml/lib/Deserializer/functions.php +++ /dev/null @@ -1,388 +0,0 @@ -value" array. - * - * For example, keyvalue will parse: - * - * - * - * value1 - * value2 - * - * - * - * Into: - * - * [ - * "{http://sabredav.org/ns}elem1" => "value1", - * "{http://sabredav.org/ns}elem2" => "value2", - * "{http://sabredav.org/ns}elem3" => null, - * ]; - * - * If you specify the 'namespace' argument, the deserializer will remove - * the namespaces of the keys that match that namespace. - * - * For example, if you call keyValue like this: - * - * keyValue($reader, 'http://sabredav.org/ns') - * - * it's output will instead be: - * - * [ - * "elem1" => "value1", - * "elem2" => "value2", - * "elem3" => null, - * ]; - * - * Attributes will be removed from the top-level elements. If elements with - * the same name appear twice in the list, only the last one will be kept. - * - * @phpstan-return array - */ -function keyValue(Reader $reader, ?string $namespace = null): array -{ - // If there's no children, we don't do anything. - if ($reader->isEmptyElement) { - $reader->next(); - - return []; - } - - if (!$reader->read()) { - $reader->next(); - - return []; - } - - if (Reader::END_ELEMENT === $reader->nodeType) { - $reader->next(); - - return []; - } - - $values = []; - - do { - if (Reader::ELEMENT === $reader->nodeType) { - if (null !== $namespace && $reader->namespaceURI === $namespace) { - $values[$reader->localName] = $reader->parseCurrentElement()['value']; - } else { - $clark = $reader->getClark(); - $values[$clark] = $reader->parseCurrentElement()['value']; - } - } else { - if (!$reader->read()) { - break; - } - } - } while (Reader::END_ELEMENT !== $reader->nodeType); - - $reader->read(); - - return $values; -} - -/** - * The 'enum' deserializer parses elements into a simple list - * without values or attributes. - * - * For example, Elements will parse: - * - * - * - * - * - * - * content - * - * - * - * Into: - * - * [ - * "{http://sabredav.org/ns}elem1", - * "{http://sabredav.org/ns}elem2", - * "{http://sabredav.org/ns}elem3", - * "{http://sabredav.org/ns}elem4", - * "{http://sabredav.org/ns}elem5", - * ]; - * - * This is useful for 'enum'-like structures. - * - * If the $namespace argument is specified, it will strip the namespace - * for all elements that match that. - * - * For example, - * - * enum($reader, 'http://sabredav.org/ns') - * - * would return: - * - * [ - * "elem1", - * "elem2", - * "elem3", - * "elem4", - * "elem5", - * ]; - * - * @return string[] - * - * @phpstan-return list - */ -function enum(Reader $reader, ?string $namespace = null): array -{ - // If there's no children, we don't do anything. - if ($reader->isEmptyElement) { - $reader->next(); - - return []; - } - if (!$reader->read()) { - $reader->next(); - - return []; - } - - if (Reader::END_ELEMENT === $reader->nodeType) { - $reader->next(); - - return []; - } - $currentDepth = $reader->depth; - - $values = []; - do { - if (Reader::ELEMENT !== $reader->nodeType) { - continue; - } - if (!is_null($namespace) && $namespace === $reader->namespaceURI) { - $values[] = $reader->localName; - } else { - $values[] = (string) $reader->getClark(); - } - } while ($reader->depth >= $currentDepth && $reader->next()); - - $reader->next(); - - return $values; -} - -/** - * The valueObject deserializer turns an XML element into a PHP object of - * a specific class. - * - * This is primarily used by the mapValueObject function from the Service - * class, but it can also easily be used for more specific situations. - * - * @template C of object - * - * @param class-string $className - * - * @phpstan-return C - */ -function valueObject(Reader $reader, string $className, string $namespace): object -{ - $valueObject = new $className(); - if ($reader->isEmptyElement) { - $reader->next(); - - return $valueObject; - } - - $defaultProperties = get_class_vars($className); - - $reader->read(); - do { - if (Reader::ELEMENT === $reader->nodeType && $reader->namespaceURI == $namespace) { - if (property_exists($valueObject, $reader->localName)) { - if (is_array($defaultProperties[$reader->localName])) { - $valueObject->{$reader->localName}[] = $reader->parseCurrentElement()['value']; - } else { - $valueObject->{$reader->localName} = $reader->parseCurrentElement()['value']; - } - } else { - // Ignore property - $reader->next(); - } - } elseif (Reader::ELEMENT === $reader->nodeType) { - // Skipping element from different namespace - $reader->next(); - } else { - if (Reader::END_ELEMENT !== $reader->nodeType && !$reader->read()) { - break; - } - } - } while (Reader::END_ELEMENT !== $reader->nodeType); - - $reader->read(); - - return $valueObject; -} - -/** - * This deserializer helps you deserialize xml structures that look like - * this:. - * - * - * ... - * ... - * ... - * - * - * Many XML documents use patterns like that, and this deserializer - * allow you to get all the 'items' as an array. - * - * In that previous example, you would register the deserializer as such: - * - * $reader->elementMap['{}collection'] = function($reader) { - * return repeatingElements($reader, '{}item'); - * } - * - * The repeatingElements deserializer simply returns everything as an array. - * - * $childElementName must either be a clark-notation element name, or if no - * namespace is used, the bare element name. - * - * @phpstan-return list - */ -function repeatingElements(Reader $reader, string $childElementName): array -{ - if ('{' !== $childElementName[0]) { - $childElementName = '{}'.$childElementName; - } - $result = []; - - foreach ($reader->parseGetElements() as $element) { - if ($element['name'] === $childElementName) { - $result[] = $element['value']; - } - } - - return $result; -} - -/** - * This deserializer helps you to deserialize structures which contain mixed content. - * - *

some text and an inline tagand even more text

- * - * The above example will return - * - * [ - * 'some text', - * [ - * 'name' => '{}extref', - * 'value' => 'and an inline tag', - * 'attributes' => [] - * ], - * 'and even more text' - * ] - * - * In strict XML documents you won't find this kind of markup but in html this is a quite common pattern. - * - * @return array - */ -function mixedContent(Reader $reader): array -{ - // If there's no children, we don't do anything. - if ($reader->isEmptyElement) { - $reader->next(); - - return []; - } - - $previousDepth = $reader->depth; - - $content = []; - $reader->read(); - while (true) { - if (Reader::ELEMENT == $reader->nodeType) { - $content[] = $reader->parseCurrentElement(); - } elseif ($reader->depth >= $previousDepth && in_array($reader->nodeType, [Reader::TEXT, Reader::CDATA, Reader::WHITESPACE])) { - $content[] = $reader->value; - $reader->read(); - } elseif (Reader::END_ELEMENT == $reader->nodeType) { - // Ensuring we are moving the cursor after the end element. - $reader->read(); - break; - } else { - $reader->read(); - } - } - - return $content; -} - -/** - * The functionCaller deserializer turns an XML element into whatever your callable returns. - * - * You can use, e.g., a named constructor (factory method) to create an object using - * this function. - * - * @return mixed whatever the 'func' callable returns - * - * @throws \InvalidArgumentException|\ReflectionException - */ -function functionCaller(Reader $reader, callable $func, string $namespace) -{ - if ($reader->isEmptyElement) { - $reader->next(); - - return null; - } - - $funcArgs = []; - if (is_array($func)) { - $ref = new \ReflectionMethod($func[0], $func[1]); - } elseif (is_string($func) && false !== strpos($func, '::')) { - // We have a string that should refer to a method that exists, like "MyClass::someMethod" - // ReflectionMethod knows how to handle that as-is - $ref = new \ReflectionMethod($func); - } elseif ($func instanceof \Closure || is_string($func)) { - // We have an actual Closure (a real function) or a string that is the name of a function - // ReflectionFunction can take either of those - $ref = new \ReflectionFunction($func); - } else { - throw new \InvalidArgumentException(__METHOD__.' unable to use func parameter with ReflectionMethod or ReflectionFunction.'); - } - - foreach ($ref->getParameters() as $parameter) { - $funcArgs[$parameter->getName()] = null; - } - - $reader->read(); - do { - if (Reader::ELEMENT === $reader->nodeType && $reader->namespaceURI == $namespace) { - if (array_key_exists($reader->localName, $funcArgs)) { - $funcArgs[$reader->localName] = $reader->parseCurrentElement()['value']; - } else { - // Ignore property - $reader->next(); - } - } else { - $reader->read(); - } - } while (Reader::END_ELEMENT !== $reader->nodeType); - $reader->read(); - - return $func(...array_values($funcArgs)); -} diff --git a/vendor/sabre/xml/lib/Element.php b/vendor/sabre/xml/lib/Element.php deleted file mode 100644 index 559eb54ea..000000000 --- a/vendor/sabre/xml/lib/Element.php +++ /dev/null @@ -1,22 +0,0 @@ -value = $value; - } - - /** - * The xmlSerialize method is called during xml writing. - * - * Use the $writer argument to write its own xml serialization. - * - * An important note: do _not_ create a parent element. Any element - * implementing XmlSerializable should only ever write what's considered - * its 'inner xml'. - * - * The parent of the current element is responsible for writing a - * containing element. - * - * This allows serializers to be re-used for different element names. - * - * If you are opening new elements, you must also close them again. - */ - public function xmlSerialize(Xml\Writer $writer): void - { - $writer->write($this->value); - } - - /** - * The deserialize method is called during xml parsing. - * - * This method is called statically, this is because in theory this method - * may be used as a type of constructor, or factory method. - * - * Often you want to return an instance of the current class, but you are - * free to return other data as well. - * - * Important note 2: You are responsible for advancing the reader to the - * next element. Not doing anything will result in a never-ending loop. - * - * If you just want to skip parsing for this element altogether, you can - * just call $reader->next(); - * - * $reader->parseInnerTree() will parse the entire sub-tree, and advance to - * the next element. - * - * @return array>|string|null - */ - public static function xmlDeserialize(Xml\Reader $reader) - { - $subTree = $reader->parseInnerTree(); - - return $subTree; - } -} diff --git a/vendor/sabre/xml/lib/Element/Cdata.php b/vendor/sabre/xml/lib/Element/Cdata.php deleted file mode 100644 index 8e16afbae..000000000 --- a/vendor/sabre/xml/lib/Element/Cdata.php +++ /dev/null @@ -1,57 +0,0 @@ -value = $value; - } - - /** - * The xmlSerialize method is called during xml writing. - * - * Use the $writer argument to write its own xml serialization. - * - * An important note: do _not_ create a parent element. Any element - * implementing XmlSerializable should only ever write what's considered - * its 'inner xml'. - * - * The parent of the current element is responsible for writing a - * containing element. - * - * This allows serializers to be re-used for different element names. - * - * If you are opening new elements, you must also close them again. - */ - public function xmlSerialize(Xml\Writer $writer): void - { - $writer->writeCData($this->value); - } -} diff --git a/vendor/sabre/xml/lib/Element/Elements.php b/vendor/sabre/xml/lib/Element/Elements.php deleted file mode 100644 index 427cf35e1..000000000 --- a/vendor/sabre/xml/lib/Element/Elements.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * - * - * - * content - * - * - * - * Into: - * - * [ - * "{http://sabredav.org/ns}elem1", - * "{http://sabredav.org/ns}elem2", - * "{http://sabredav.org/ns}elem3", - * "{http://sabredav.org/ns}elem4", - * "{http://sabredav.org/ns}elem5", - * ]; - * - * @copyright Copyright (C) 2009-2015 fruux GmbH (https://fruux.com/). - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class Elements implements Xml\Element -{ - /** - * Value to serialize. - * - * @var array - */ - protected array $value; - - /** - * Constructor. - * - * @param array $value - */ - public function __construct(array $value = []) - { - $this->value = $value; - } - - /** - * The xmlSerialize method is called during xml writing. - * - * Use the $writer argument to write its own xml serialization. - * - * An important note: do _not_ create a parent element. Any element - * implementing XmlSerializable should only ever write what's considered - * its 'inner xml'. - * - * The parent of the current element is responsible for writing a - * containing element. - * - * This allows serializers to be re-used for different element names. - * - * If you are opening new elements, you must also close them again. - */ - public function xmlSerialize(Xml\Writer $writer): void - { - Serializer\enum($writer, $this->value); - } - - /** - * The deserialize method is called during xml parsing. - * - * This method is called statically, this is because in theory this method - * may be used as a type of constructor, or factory method. - * - * Often you want to return an instance of the current class, but you are - * free to return other data as well. - * - * Important note 2: You are responsible for advancing the reader to the - * next element. Not doing anything will result in a never-ending loop. - * - * If you just want to skip parsing for this element altogether, you can - * just call $reader->next(); - * - * $reader->parseSubTree() will parse the entire sub-tree, and advance to - * the next element. - * - * @return string[] - */ - public static function xmlDeserialize(Xml\Reader $reader) - { - return Deserializer\enum($reader); - } -} diff --git a/vendor/sabre/xml/lib/Element/KeyValue.php b/vendor/sabre/xml/lib/Element/KeyValue.php deleted file mode 100644 index 8e5ae055c..000000000 --- a/vendor/sabre/xml/lib/Element/KeyValue.php +++ /dev/null @@ -1,102 +0,0 @@ -value struct. - * - * Attributes will be removed, and duplicate child elements are discarded. - * Complex values within the elements will be parsed by the 'standard' parser. - * - * For example, KeyValue will parse: - * - * - * - * value1 - * value2 - * - * - * - * Into: - * - * [ - * "{http://sabredav.org/ns}elem1" => "value1", - * "{http://sabredav.org/ns}elem2" => "value2", - * "{http://sabredav.org/ns}elem3" => null, - * ]; - * - * @copyright Copyright (C) 2009-2015 fruux GmbH (https://fruux.com/). - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class KeyValue implements Xml\Element -{ - /** - * Value to serialize. - * - * @var array - */ - protected array $value; - - /** - * Constructor. - * - * @param array $value - */ - public function __construct(array $value = []) - { - $this->value = $value; - } - - /** - * The xmlSerialize method is called during xml writing. - * - * Use the $writer argument to write its own xml serialization. - * - * An important note: do _not_ create a parent element. Any element - * implementing XmlSerializable should only ever write what's considered - * its 'inner xml'. - * - * The parent of the current element is responsible for writing a - * containing element. - * - * This allows serializers to be re-used for different element names. - * - * If you are opening new elements, you must also close them again. - */ - public function xmlSerialize(Xml\Writer $writer): void - { - $writer->write($this->value); - } - - /** - * The deserialize method is called during xml parsing. - * - * This method is called statically, this is because in theory this method - * may be used as a type of constructor, or factory method. - * - * Often you want to return an instance of the current class, but you are - * free to return other data as well. - * - * Important note 2: You are responsible for advancing the reader to the - * next element. Not doing anything will result in a never-ending loop. - * - * If you just want to skip parsing for this element altogether, you can - * just call $reader->next(); - * - * $reader->parseInnerTree() will parse the entire sub-tree, and advance to - * the next element. - * - * @return array - */ - public static function xmlDeserialize(Xml\Reader $reader) - { - return Deserializer\keyValue($reader); - } -} diff --git a/vendor/sabre/xml/lib/Element/Uri.php b/vendor/sabre/xml/lib/Element/Uri.php deleted file mode 100644 index e54d706a9..000000000 --- a/vendor/sabre/xml/lib/Element/Uri.php +++ /dev/null @@ -1,95 +0,0 @@ -/foo/bar - * http://example.org/hi - * - * If the uri is relative, it will be automatically expanded to an absolute - * url during writing and reading, if the contextUri property is set on the - * reader and/or writer. - * - * @copyright Copyright (C) 2009-2015 fruux GmbH (https://fruux.com/). - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class Uri implements Xml\Element -{ - /** - * Uri element value. - */ - protected string $value; - - /** - * Constructor. - */ - public function __construct(string $value) - { - $this->value = $value; - } - - /** - * The xmlSerialize method is called during xml writing. - * - * Use the $writer argument to write its own xml serialization. - * - * An important note: do _not_ create a parent element. Any element - * implementing XmlSerializable should only ever write what's considered - * its 'inner xml'. - * - * The parent of the current element is responsible for writing a - * containing element. - * - * This allows serializers to be re-used for different element names. - * - * If you are opening new elements, you must also close them again. - */ - public function xmlSerialize(Xml\Writer $writer): void - { - $writer->text( - resolve( - $writer->contextUri ?? '', - $this->value - ) - ); - } - - /** - * This method is called during xml parsing. - * - * This method is called statically, this is because in theory this method - * may be used as a type of constructor, or factory method. - * - * Often you want to return an instance of the current class, but you are - * free to return other data as well. - * - * Important note 2: You are responsible for advancing the reader to the - * next element. Not doing anything will result in a never-ending loop. - * - * If you just want to skip parsing for this element altogether, you can - * just call $reader->next(); - * - * $reader->parseSubTree() will parse the entire sub-tree, and advance to - * the next element. - */ - public static function xmlDeserialize(Xml\Reader $reader) - { - return new self( - resolve( - (string) $reader->contextUri, - $reader->readText() - ) - ); - } -} diff --git a/vendor/sabre/xml/lib/Element/XmlFragment.php b/vendor/sabre/xml/lib/Element/XmlFragment.php deleted file mode 100644 index 94f745b4c..000000000 --- a/vendor/sabre/xml/lib/Element/XmlFragment.php +++ /dev/null @@ -1,144 +0,0 @@ -xml = $xml; - } - - /** - * Returns the inner XML document. - */ - public function getXml(): string - { - return $this->xml; - } - - /** - * The xmlSerialize method is called during xml writing. - * - * Use the $writer argument to write its own xml serialization. - * - * An important note: do _not_ create a parent element. Any element - * implementing XmlSerializable should only ever write what's considered - * its 'inner xml'. - * - * The parent of the current element is responsible for writing a - * containing element. - * - * This allows serializers to be re-used for different element names. - * - * If you are opening new elements, you must also close them again. - */ - public function xmlSerialize(Writer $writer): void - { - $reader = new Reader(); - - // Wrapping the xml in a container, so root-less values can still be - // parsed. - $xml = << -{$this->getXml()} -XML; - - $reader->xml($xml); - - while ($reader->read()) { - if ($reader->depth < 1) { - // Skipping the root node. - continue; - } - - switch ($reader->nodeType) { - case Reader::ELEMENT: - $writer->startElement( - (string) $reader->getClark() - ); - $empty = $reader->isEmptyElement; - while ($reader->moveToNextAttribute()) { - switch ($reader->namespaceURI) { - case '': - $writer->writeAttribute($reader->localName, $reader->value); - break; - case 'http://www.w3.org/2000/xmlns/': - // Skip namespace declarations - break; - default: - $writer->writeAttribute((string) $reader->getClark(), $reader->value); - break; - } - } - if ($empty) { - $writer->endElement(); - } - break; - case Reader::CDATA: - case Reader::TEXT: - $writer->text( - $reader->value - ); - break; - case Reader::END_ELEMENT: - $writer->endElement(); - break; - } - } - } - - /** - * The deserialize method is called during xml parsing. - * - * This method is called statically, this is because in theory this method - * may be used as a type of constructor, or factory method. - * - * Often you want to return an instance of the current class, but you are - * free to return other data as well. - * - * You are responsible for advancing the reader to the next element. Not - * doing anything will result in a never-ending loop. - * - * If you just want to skip parsing for this element altogether, you can - * just call $reader->next(); - * - * $reader->parseInnerTree() will parse the entire sub-tree, and advance to - * the next element. - */ - public static function xmlDeserialize(Reader $reader) - { - $result = new self($reader->readInnerXml()); - $reader->next(); - - return $result; - } -} diff --git a/vendor/sabre/xml/lib/LibXMLException.php b/vendor/sabre/xml/lib/LibXMLException.php deleted file mode 100644 index 5c642a3bf..000000000 --- a/vendor/sabre/xml/lib/LibXMLException.php +++ /dev/null @@ -1,49 +0,0 @@ -errors = $errors; - parent::__construct($errors[0]->message.' on line '.$errors[0]->line.', column '.$errors[0]->column, $code, $previousException); - } - - /** - * Returns the LibXML errors. - * - * @return \LibXMLError[] - */ - public function getErrors(): array - { - return $this->errors; - } -} diff --git a/vendor/sabre/xml/lib/ParseException.php b/vendor/sabre/xml/lib/ParseException.php deleted file mode 100644 index ff6656b23..000000000 --- a/vendor/sabre/xml/lib/ParseException.php +++ /dev/null @@ -1,16 +0,0 @@ -localName) { - return null; - } - - return '{'.$this->namespaceURI.'}'.$this->localName; - } - - /** - * Reads the entire document. - * - * This function returns an array with the following three elements: - * * name - The root element name. - * * value - The value for the root element. - * * attributes - An array of attributes. - * - * This function will also disable the standard libxml error handler (which - * usually just results in PHP errors), and throw exceptions instead. - * - * @return array - */ - public function parse(): array - { - $previousEntityState = null; - $shouldCallLibxmlDisableEntityLoader = (\LIBXML_VERSION < 20900); - if ($shouldCallLibxmlDisableEntityLoader) { - $previousEntityState = libxml_disable_entity_loader(true); - } - $previousSetting = libxml_use_internal_errors(true); - - try { - while (self::ELEMENT !== $this->nodeType) { - if (!$this->read()) { - $errors = libxml_get_errors(); - libxml_clear_errors(); - if ($errors) { - throw new LibXMLException($errors); - } - } - } - $result = $this->parseCurrentElement(); - - // last line of defense in case errors did occur above - $errors = libxml_get_errors(); - libxml_clear_errors(); - if ($errors) { - throw new LibXMLException($errors); - } - } finally { - libxml_use_internal_errors($previousSetting); - if ($shouldCallLibxmlDisableEntityLoader) { - libxml_disable_entity_loader($previousEntityState); - } - } - - return $result; - } - - /** - * parseGetElements parses everything in the current sub-tree, - * and returns an array of elements. - * - * Each element has a 'name', 'value' and 'attributes' key. - * - * If the element didn't contain sub-elements, an empty array is always - * returned. If there was any text inside the element, it will be - * discarded. - * - * If the $elementMap argument is specified, the existing elementMap will - * be overridden while parsing the tree, and restored after this process. - * - * @param array|null $elementMap - * - * @return array> - */ - public function parseGetElements(?array $elementMap = null): array - { - $result = $this->parseInnerTree($elementMap); - if (!is_array($result)) { - return []; - } - - return $result; - } - - /** - * Parses all elements below the current element. - * - * This method will return a string if this was a text-node, or an array if - * there were sub-elements. - * - * If there's both text and sub-elements, the text will be discarded. - * - * If the $elementMap argument is specified, the existing elementMap will - * be overridden while parsing the tree, and restored after this process. - * - * @param array|null $elementMap - * - * @return array>|string|null - */ - public function parseInnerTree(?array $elementMap = null) - { - $text = null; - $elements = []; - - if (self::ELEMENT === $this->nodeType && $this->isEmptyElement) { - // Easy! - $this->next(); - - return null; - } - - if (!is_null($elementMap)) { - $this->pushContext(); - $this->elementMap = $elementMap; - } - - try { - if (!$this->read()) { - $errors = libxml_get_errors(); - libxml_clear_errors(); - if ($errors) { - throw new LibXMLException($errors); - } - throw new ParseException('This should never happen (famous last words)'); - } - - $keepOnParsing = true; - - while ($keepOnParsing) { - if (!$this->isValid()) { - $errors = libxml_get_errors(); - - if ($errors) { - libxml_clear_errors(); - throw new LibXMLException($errors); - } - } - - switch ($this->nodeType) { - case self::ELEMENT: - $elements[] = $this->parseCurrentElement(); - break; - case self::TEXT: - case self::CDATA: - $text .= $this->value; - $this->read(); - break; - case self::END_ELEMENT: - // Ensuring we are moving the cursor after the end element. - $this->read(); - $keepOnParsing = false; - break; - case self::NONE: - throw new ParseException('We hit the end of the document prematurely. This likely means that some parser "eats" too many elements. Do not attempt to continue parsing.'); - default: - // Advance to the next element - $this->read(); - break; - } - } - } finally { - if (!is_null($elementMap)) { - $this->popContext(); - } - } - - return $elements ?: $text; - } - - /** - * Reads all text below the current element, and returns this as a string. - */ - public function readText(): string - { - $result = ''; - $previousDepth = $this->depth; - - while ($this->read() && $this->depth != $previousDepth) { - if (in_array($this->nodeType, [\XMLReader::TEXT, \XMLReader::CDATA, \XMLReader::WHITESPACE])) { - $result .= $this->value; - } - } - - return $result; - } - - /** - * Parses the current XML element. - * - * This method returns arn array with 3 properties: - * * name - A clark-notation XML element name. - * * value - The parsed value. - * * attributes - A key-value list of attributes. - * - * @return array - */ - public function parseCurrentElement(): array - { - $name = $this->getClark(); - - $attributes = []; - - if ($this->hasAttributes) { - $attributes = $this->parseAttributes(); - } - - $value = call_user_func( - $this->getDeserializerForElementName((string) $name), - $this - ); - - return [ - 'name' => $name, - 'value' => $value, - 'attributes' => $attributes, - ]; - } - - /** - * Grabs all the attributes from the current element, and returns them as a - * key-value array. - * - * If the attributes are part of the same namespace, they will simply be - * short keys. If they are defined on a different namespace, the attribute - * name will be returned in clark-notation. - * - * @return array - */ - public function parseAttributes(): array - { - $attributes = []; - - while ($this->moveToNextAttribute()) { - if ($this->namespaceURI) { - // Ignoring 'xmlns', it doesn't make any sense. - if ('http://www.w3.org/2000/xmlns/' === $this->namespaceURI) { - continue; - } - - $name = $this->getClark(); - $attributes[$name] = $this->value; - } else { - $attributes[$this->localName] = $this->value; - } - } - $this->moveToElement(); - - return $attributes; - } - - /** - * Returns the function that should be used to parse the element identified - * by its clark-notation name. - */ - public function getDeserializerForElementName(string $name): callable - { - if (!array_key_exists($name, $this->elementMap)) { - if ('{}' == substr($name, 0, 2) && array_key_exists(substr($name, 2), $this->elementMap)) { - $name = substr($name, 2); - } else { - return ['Sabre\\Xml\\Element\\Base', 'xmlDeserialize']; - } - } - - $deserializer = $this->elementMap[$name]; - if (is_callable($deserializer)) { - return $deserializer; - } - - if (is_subclass_of($deserializer, 'Sabre\\Xml\\XmlDeserializable')) { - return [$deserializer, 'xmlDeserialize']; - } - - $type = gettype($deserializer); - if (is_string($deserializer)) { - $type .= ' ('.$deserializer.')'; - } elseif (is_object($deserializer)) { - $type .= ' ('.get_class($deserializer).')'; - } - throw new \LogicException('Could not use this type as a deserializer: '.$type.' for element: '.$name); - } -} diff --git a/vendor/sabre/xml/lib/Serializer/functions.php b/vendor/sabre/xml/lib/Serializer/functions.php deleted file mode 100644 index a6105a9ef..000000000 --- a/vendor/sabre/xml/lib/Serializer/functions.php +++ /dev/null @@ -1,207 +0,0 @@ - - * - * - * content - * - * - * @param string[] $values - */ -function enum(Writer $writer, array $values): void -{ - foreach ($values as $value) { - $writer->writeElement($value); - } -} - -/** - * The valueObject serializer turns a simple PHP object into a classname. - * - * Every public property will be encoded as an XML element with the same - * name, in the XML namespace as specified. - * - * Values that are set to null or an empty array are not serialized. To - * serialize empty properties, you must specify them as an empty string. - */ -function valueObject(Writer $writer, object $valueObject, string $namespace): void -{ - foreach (get_object_vars($valueObject) as $key => $val) { - if (is_array($val)) { - // If $val is an array, it has a special meaning. We need to - // generate one child element for each item in $val - foreach ($val as $child) { - $writer->writeElement('{'.$namespace.'}'.$key, $child); - } - } elseif (null !== $val) { - $writer->writeElement('{'.$namespace.'}'.$key, $val); - } - } -} - -/** - * This serializer helps you serialize xml structures that look like - * this:. - * - * - * ... - * ... - * ... - * - * - * In that previous example, this serializer just serializes the item element, - * and this could be called like this: - * - * repeatingElements($writer, $items, '{}item'); - * - * @param array $items - */ -function repeatingElements(Writer $writer, array $items, string $childElementName): void -{ - foreach ($items as $item) { - $writer->writeElement($childElementName, $item); - } -} - -/** - * This function is the 'default' serializer that is able to serialize most - * things, and delegates to other serializers if needed. - * - * The standardSerializer supports a wide-array of values. - * - * $value may be a string or integer, it will just write out the string as text. - * $value may be an instance of XmlSerializable or Element, in which case it - * calls it's xmlSerialize() method. - * $value may be a PHP callback/function/closure, in case we call the callback - * and give it the Writer as an argument. - * $value may be an object, and if it's in the classMap we automatically call - * the correct serializer for it. - * $value may be null, in which case we do nothing. - * - * If $value is an array, the array must look like this: - * - * [ - * [ - * 'name' => '{namespaceUri}element-name', - * 'value' => '...', - * 'attributes' => [ 'attName' => 'attValue' ] - * ] - * [, - * 'name' => '{namespaceUri}element-name2', - * 'value' => '...', - * ] - * ] - * - * This would result in xml like: - * - * - * ... - * - * - * ... - * - * - * The value property may be any value standardSerializer supports, so you can - * nest data-structures this way. Both value and attributes are optional. - * - * Alternatively, you can also specify the array using this syntax: - * - * [ - * [ - * '{namespaceUri}element-name' => '...', - * '{namespaceUri}element-name2' => '...', - * ] - * ] - * - * This is excellent for simple key->value structures, and here you can also - * specify anything for the value. - * - * You can even mix the two array syntaxes. - * - * @param string|int|float|bool|array|object $value - */ -function standardSerializer(Writer $writer, $value): void -{ - if (is_scalar($value)) { - // String, integer, float, boolean - $writer->text((string) $value); - } elseif ($value instanceof XmlSerializable) { - // XmlSerializable classes or Element classes. - $value->xmlSerialize($writer); - } elseif (is_object($value) && isset($writer->classMap[get_class($value)])) { - // It's an object which class appears in the classmap. - $writer->classMap[get_class($value)]($writer, $value); - } elseif (is_callable($value)) { - // A callback - $value($writer); - } elseif (is_array($value) && array_key_exists('name', $value)) { - // if the array had a 'name' element, we assume that this array - // describes a 'name' and optionally 'attributes' and 'value'. - - $name = $value['name']; - $attributes = isset($value['attributes']) ? $value['attributes'] : []; - $value = isset($value['value']) ? $value['value'] : null; - - $writer->startElement($name); - $writer->writeAttributes($attributes); - $writer->write($value); - $writer->endElement(); - } elseif (is_array($value)) { - foreach ($value as $name => $item) { - if (is_int($name)) { - // This item has a numeric index. We just loop through the - // array and throw it back in the writer. - standardSerializer($writer, $item); - } elseif (is_string($name) && is_array($item) && isset($item['attributes'])) { - // The key is used for a name, but $item has 'attributes' and - // possibly 'value' - $writer->startElement($name); - $writer->writeAttributes($item['attributes']); - if (isset($item['value'])) { - $writer->write($item['value']); - } - $writer->endElement(); - } elseif (is_string($name)) { - // This was a plain key-value array. - $writer->startElement($name); - $writer->write($item); - $writer->endElement(); - } else { - throw new \InvalidArgumentException('The writer does not know how to serialize arrays with keys of type: '.gettype($name)); - } - } - } elseif (is_object($value)) { - throw new \InvalidArgumentException('The writer cannot serialize objects of class: '.get_class($value)); - } elseif (!is_null($value)) { - throw new \InvalidArgumentException('The writer cannot serialize values of type: '.gettype($value)); - } -} diff --git a/vendor/sabre/xml/lib/Service.php b/vendor/sabre/xml/lib/Service.php deleted file mode 100644 index ace923f08..000000000 --- a/vendor/sabre/xml/lib/Service.php +++ /dev/null @@ -1,326 +0,0 @@ - - */ - public array $elementMap = []; - - /** - * This is a list of namespaces that you want to give default prefixes. - * - * You must make sure you create this entire list before starting to write. - * They should be registered on the root element. - * - * @phpstan-var array - */ - public array $namespaceMap = []; - - /** - * This is a list of custom serializers for specific classes. - * - * The writer may use this if you attempt to serialize an object with a - * class that does not implement XmlSerializable. - * - * Instead, it will look at this classmap to see if there is a custom - * serializer here. This is useful if you don't want your value objects - * to be responsible for serializing themselves. - * - * The keys in this classmap need to be fully qualified PHP class names, - * the values must be callbacks. The callbacks take two arguments. The - * writer class, and the value that must be written. - * - * function (Writer $writer, object $value) - * - * @phpstan-var array - */ - public array $classMap = []; - - /** - * A bitmask of the LIBXML_* constants. - */ - public int $options = 0; - - /** - * Returns a fresh XML Reader. - */ - public function getReader(): Reader - { - $r = new Reader(); - $r->elementMap = $this->elementMap; - - return $r; - } - - /** - * Returns a fresh xml writer. - */ - public function getWriter(): Writer - { - $w = new Writer(); - $w->namespaceMap = $this->namespaceMap; - $w->classMap = $this->classMap; - - return $w; - } - - /** - * Parses a document in full. - * - * Input may be specified as a string or readable stream resource. - * The returned value is the value of the root document. - * - * Specifying the $contextUri allows the parser to figure out what the URI - * of the document was. This allows relative URIs within the document to be - * expanded easily. - * - * The $rootElementName is specified by reference and will be populated - * with the root element name of the document. - * - * @param string|resource $input - * - * @return array|object|string - * - * @throws ParseException - */ - public function parse($input, ?string $contextUri = null, ?string &$rootElementName = null) - { - if (!is_string($input)) { - // Unfortunately the XMLReader doesn't support streams. When it - // does, we can optimize this. - if (is_resource($input)) { - $input = (string) stream_get_contents($input); - } else { - // Input is not a string and not a resource. - // Therefore, it has to be a closed resource. - // Effectively empty input has been passed in. - $input = ''; - } - } - - // If input is empty, then it's safe to throw an exception - if (empty($input)) { - throw new ParseException('The input element to parse is empty. Do not attempt to parse'); - } - - $r = $this->getReader(); - $r->contextUri = $contextUri; - $r->XML($input, null, $this->options); - - $result = $r->parse(); - $rootElementName = $result['name']; - - return $result['value']; - } - - /** - * Parses a document in full, and specify what the expected root element - * name is. - * - * This function works similar to parse, but the difference is that the - * user can specify what the expected name of the root element should be, - * in clark notation. - * - * This is useful in cases where you expected a specific document to be - * passed, and reduces the amount of if statements. - * - * It's also possible to pass an array of expected rootElements if your - * code may expect more than one document type. - * - * @param string|string[] $rootElementName - * @param string|resource $input - * - * @return array|object|string - * - * @throws ParseException - */ - public function expect($rootElementName, $input, ?string $contextUri = null) - { - if (!is_string($input)) { - // Unfortunately the XMLReader doesn't support streams. When it - // does, we can optimize this. - if (is_resource($input)) { - $input = (string) stream_get_contents($input); - } else { - // Input is not a string and not a resource. - // Therefore, it has to be a closed resource. - // Effectively empty input has been passed in. - $input = ''; - } - } - - // If input is empty, then it's safe to throw an exception - if (empty($input)) { - throw new ParseException('The input element to parse is empty. Do not attempt to parse'); - } - - $r = $this->getReader(); - $r->contextUri = $contextUri; - $r->XML($input, null, $this->options); - - $rootElementName = (array) $rootElementName; - - foreach ($rootElementName as &$rEl) { - if ('{' !== $rEl[0]) { - $rEl = '{}'.$rEl; - } - } - - $result = $r->parse(); - if (!in_array($result['name'], $rootElementName, true)) { - throw new ParseException('Expected '.implode(' or ', $rootElementName).' but received '.$result['name'].' as the root element'); - } - - return $result['value']; - } - - /** - * Generates an XML document in one go. - * - * The $rootElement must be specified in clark notation. - * The value must be a string, an array or an object implementing - * XmlSerializable. Basically, anything that's supported by the Writer - * object. - * - * $contextUri can be used to specify a sort of 'root' of the PHP application, - * in case the xml document is used as a http response. - * - * This allows an implementor to easily create URI's relative to the root - * of the domain. - * - * @param string|array|object|XmlSerializable $value - */ - public function write(string $rootElementName, $value, ?string $contextUri = null): string - { - $w = $this->getWriter(); - $w->openMemory(); - $w->contextUri = $contextUri; - $w->setIndent(true); - $w->startDocument(); - $w->writeElement($rootElementName, $value); - - return $w->outputMemory(); - } - - /** - * Map an XML element to a PHP class. - * - * Calling this function will automatically set up the Reader and Writer - * classes to turn a specific XML element to a PHP class. - * - * For example, given a class such as : - * - * class Author { - * public $firstName; - * public $lastName; - * } - * - * and an XML element such as: - * - * - * ... - * ... - * - * - * These can easily be mapped by calling: - * - * $service->mapValueObject('{http://example.org}author', 'Author'); - * - * @param class-string $className - */ - public function mapValueObject(string $elementName, string $className): void - { - list($namespace) = self::parseClarkNotation($elementName); - - $this->elementMap[$elementName] = function (Reader $reader) use ($className, $namespace) { - return \Sabre\Xml\Deserializer\valueObject($reader, $className, $namespace); - }; - $this->classMap[$className] = function (Writer $writer, $valueObject) use ($namespace) { - \Sabre\Xml\Serializer\valueObject($writer, $valueObject, $namespace); - }; - $this->valueObjectMap[$className] = $elementName; - } - - /** - * Writes a value object. - * - * This function largely behaves similar to write(), except that it's - * intended specifically to serialize a Value Object into an XML document. - * - * The ValueObject must have been previously registered using - * mapValueObject(). - * - * @throws \InvalidArgumentException - */ - public function writeValueObject(object $object, ?string $contextUri = null): string - { - if (!isset($this->valueObjectMap[get_class($object)])) { - throw new \InvalidArgumentException('"'.get_class($object).'" is not a registered value object class. Register your class with mapValueObject.'); - } - - return $this->write( - $this->valueObjectMap[get_class($object)], - $object, - $contextUri - ); - } - - /** - * Parses a clark-notation string, and returns the namespace and element - * name components. - * - * If the string was invalid, it will throw an InvalidArgumentException. - * - * @return array{string, string} - * - * @throws \InvalidArgumentException - */ - public static function parseClarkNotation(string $str): array - { - static $cache = []; - - if (!isset($cache[$str])) { - if (!preg_match('/^{([^}]*)}(.*)$/', $str, $matches)) { - throw new \InvalidArgumentException('\''.$str.'\' is not a valid clark-notation formatted string'); - } - - $cache[$str] = [ - $matches[1], - $matches[2], - ]; - } - - return $cache[$str]; - } - - /** - * A list of classes and which XML elements they map to. - * - * @var array - */ - protected array $valueObjectMap = []; -} diff --git a/vendor/sabre/xml/lib/Version.php b/vendor/sabre/xml/lib/Version.php deleted file mode 100644 index 340393169..000000000 --- a/vendor/sabre/xml/lib/Version.php +++ /dev/null @@ -1,20 +0,0 @@ - - */ - protected array $adhocNamespaces = []; - - /** - * When the first element is written, this flag is set to true. - * - * This ensures that the namespaces in the namespaces map are only written - * once. - */ - protected bool $namespacesWritten = false; - - /** - * Writes a value to the output stream. - * - * The following values are supported: - * 1. Scalar values will be written as-is, as text. - * 2. Null values will be skipped (resulting in a short xml tag). - * 3. If a value is an instance of an Element class, writing will be - * delegated to the object. - * 4. If a value is an array, two formats are supported. - * - * Array format 1: - * [ - * "{namespace}name1" => "..", - * "{namespace}name2" => "..", - * ] - * - * One element will be created for each key in this array. The values of - * this array support any format this method supports (this method is - * called recursively). - * - * Array format 2: - * - * [ - * [ - * "name" => "{namespace}name1" - * "value" => "..", - * "attributes" => [ - * "attr" => "attribute value", - * ] - * ], - * [ - * "name" => "{namespace}name1" - * "value" => "..", - * "attributes" => [ - * "attr" => "attribute value", - * ] - * ] - * ] - * - * @param mixed $value PHP value to be written - */ - public function write($value): void - { - Serializer\standardSerializer($this, $value); - } - - /** - * Opens a new element. - * - * You can either just use a local element name, or you can use clark- - * notation to start a new element. - * - * Example: - * - * $writer->startElement('{http://www.w3.org/2005/Atom}entry'); - * - * Would result in something like: - * - * - * - * Note: this function doesn't have the string typehint, because PHP's - * XMLWriter::startElement doesn't either. - * From PHP 8.0 the typehint exists, so it can be added here after PHP 7.4 is dropped. - * - * @param string $name - */ - public function startElement($name): bool - { - if ('{' === $name[0]) { - list($namespace, $localName) = - Service::parseClarkNotation($name); - - if (array_key_exists($namespace, $this->namespaceMap)) { - $result = $this->startElementNS( - '' === $this->namespaceMap[$namespace] ? null : $this->namespaceMap[$namespace], - $localName, - null - ); - } else { - // An empty namespace means it's the global namespace. This is - // allowed, but it mustn't get a prefix. - if ('' === $namespace) { - $result = $this->startElement($localName); - $this->writeAttribute('xmlns', ''); - } else { - if (!isset($this->adhocNamespaces[$namespace])) { - $this->adhocNamespaces[$namespace] = 'x'.(count($this->adhocNamespaces) + 1); - } - $result = $this->startElementNS($this->adhocNamespaces[$namespace], $localName, $namespace); - } - } - } else { - $result = parent::startElement($name); - } - - if (!$this->namespacesWritten) { - foreach ($this->namespaceMap as $namespace => $prefix) { - $this->writeAttribute($prefix ? 'xmlns:'.$prefix : 'xmlns', $namespace); - } - $this->namespacesWritten = true; - } - - return $result; - } - - /** - * Write a full element tag and it's contents. - * - * This method automatically closes the element as well. - * - * The element name may be specified in clark-notation. - * - * Examples: - * - * $writer->writeElement('{http://www.w3.org/2005/Atom}author',null); - * becomes: - * - * - * $writer->writeElement('{http://www.w3.org/2005/Atom}author', [ - * '{http://www.w3.org/2005/Atom}name' => 'Evert Pot', - * ]); - * becomes: - * Evert Pot - * - * Note: this function doesn't have the string typehint, because PHP's - * XMLWriter::startElement doesn't either. - * From PHP 8.0 the typehint exists, so it can be added here after PHP 7.4 is dropped. - * - * @param string $name - * @param array|string|object|null $content - */ - public function writeElement($name, $content = null): bool - { - $this->startElement($name); - if (!is_null($content)) { - $this->write($content); - } - $this->endElement(); - - return true; - } - - /** - * Writes a list of attributes. - * - * Attributes are specified as a key->value array. - * - * The key is an attribute name. If the key is a 'localName', the current - * xml namespace is assumed. If it's a 'clark notation key', this namespace - * will be used instead. - * - * @param array $attributes - */ - public function writeAttributes(array $attributes): void - { - foreach ($attributes as $name => $value) { - $this->writeAttribute($name, $value); - } - } - - /** - * Writes a new attribute. - * - * The name may be specified in clark-notation. - * - * Returns true when successful. - * - * Note: this function doesn't have typehints, because for some reason - * PHP's XMLWriter::writeAttribute doesn't either. - * From PHP 8.0 the typehint exists, so it can be added here after PHP 7.4 is dropped. - * - * @param string $name - * @param string $value - */ - public function writeAttribute($name, $value): bool - { - if ('{' !== $name[0]) { - return parent::writeAttribute($name, $value); - } - - list( - $namespace, - $localName, - ) = Service::parseClarkNotation($name); - - if (array_key_exists($namespace, $this->namespaceMap)) { - // It's an attribute with a namespace we know - return $this->writeAttribute( - $this->namespaceMap[$namespace].':'.$localName, - $value - ); - } - - // We don't know the namespace, we must add it in-line - if (!isset($this->adhocNamespaces[$namespace])) { - $this->adhocNamespaces[$namespace] = 'x'.(count($this->adhocNamespaces) + 1); - } - - return $this->writeAttributeNS( - $this->adhocNamespaces[$namespace], - $localName, - $namespace, - $value - ); - } -} diff --git a/vendor/sabre/xml/lib/XmlDeserializable.php b/vendor/sabre/xml/lib/XmlDeserializable.php deleted file mode 100644 index 56448d17d..000000000 --- a/vendor/sabre/xml/lib/XmlDeserializable.php +++ /dev/null @@ -1,38 +0,0 @@ -next(); - * - * $reader->parseInnerTree() will parse the entire sub-tree, and advance to - * the next element. - * - * @return mixed see comments above - */ - public static function xmlDeserialize(Reader $reader); -} diff --git a/vendor/sabre/xml/lib/XmlSerializable.php b/vendor/sabre/xml/lib/XmlSerializable.php deleted file mode 100644 index 4cd4e7f20..000000000 --- a/vendor/sabre/xml/lib/XmlSerializable.php +++ /dev/null @@ -1,34 +0,0 @@ -getXObject($id); + if (is_null($page)) { + break; + } - // @todo $xobject could be a ElementXRef object, which would then throw an error - if (\is_object($xobject) && $xobject instanceof self && !\in_array($xobject->getUniqueId(), self::$recursionStack, true)) { - // Not a circular reference. - $text[] = $xobject->getText($page); - } + $args = preg_split('/\s/s', $command[self::COMMAND]); + $id = trim(array_pop($args), '/ '); + $xobject = $page->getXObject($id); + + // Check we got a PDFObject back. + if (!$xobject instanceof self) { + break; + } + + // If the PDFObject is an image, do nothing, as images aren't text. + if ($xobject instanceof Image) { + break; + } + + // Check this is not a circular reference. + if (!\in_array($xobject->getUniqueId(), self::$recursionStack, true)) { + $text[] = $xobject->getText($page); } break;