@@ -190,7 +190,7 @@ |
||
| 190 | 190 | * |
| 191 | 191 | * @return int|string written bytes for file or XML string for memory |
| 192 | 192 | */ |
| 193 | - public function close(): int|string |
|
| 193 | + public function close(): int | string |
|
| 194 | 194 | { |
| 195 | 195 | $this->xmlWriter->endElement(); |
| 196 | 196 | |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | { |
| 29 | 29 | $reflect = new \ReflectionClass($this); |
| 30 | 30 | $classname = $reflect->getShortName(); |
| 31 | - $xml = $this->createXML()->addChild('prn:'.lcfirst($classname), '', $this->namespace('prn')); |
|
| 31 | + $xml = $this->createXML()->addChild('prn:' . lcfirst($classname), '', $this->namespace('prn')); |
|
| 32 | 32 | |
| 33 | 33 | $this->addElements($xml, $this->elements, 'prn'); |
| 34 | 34 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | // validate / format options |
| 109 | 109 | $resolver->setRequired('type'); |
| 110 | 110 | $resolver->setNormalizer('type', $this->normalizerFactory->getClosure('list_request_type')); |
| 111 | - $resolver->setDefault('namespace', function (Options $options) { |
|
| 111 | + $resolver->setDefault('namespace', function(Options $options) { |
|
| 112 | 112 | if ('Stock' == $options['type']) { |
| 113 | 113 | return 'lStk'; |
| 114 | 114 | } |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | return 'lst'; |
| 121 | 121 | }); |
| 122 | 122 | $resolver->setAllowedValues('orderType', [null, 'receivedOrder', 'issuedOrder']); |
| 123 | - $resolver->setDefault('orderType', function (Options $options) { |
|
| 123 | + $resolver->setDefault('orderType', function(Options $options) { |
|
| 124 | 124 | if ('Order' == $options['type']) { |
| 125 | 125 | return 'receivedOrder'; |
| 126 | 126 | } |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | return null; |
| 129 | 129 | }); |
| 130 | 130 | $resolver->setAllowedValues('invoiceType', [null, 'issuedInvoice', 'issuedCreditNotice', 'issuedDebitNote', 'issuedAdvanceInvoice', 'receivable', 'issuedProformaInvoice', 'penalty', 'issuedCorrectiveTax', 'receivedInvoice', 'receivedCreditNotice', 'receivedDebitNote', 'receivedAdvanceInvoice', 'commitment', 'receivedProformaInvoice', 'receivedCorrectiveTax']); |
| 131 | - $resolver->setDefault('invoiceType', function (Options $options) { |
|
| 131 | + $resolver->setDefault('invoiceType', function(Options $options) { |
|
| 132 | 132 | if ('Invoice' == $options['type']) { |
| 133 | 133 | return 'issuedInvoice'; |
| 134 | 134 | } |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | // validate / format options |
| 54 | 54 | $resolver->setRequired('name'); |
| 55 | - $resolver->setNormalizer('name', function (OptionsResolver $options, mixed $value): string { |
|
| 55 | + $resolver->setNormalizer('name', function(OptionsResolver $options, mixed $value): string { |
|
| 56 | 56 | $prefix = 'VPr'; |
| 57 | 57 | $value = \strval($value); |
| 58 | 58 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | }); |
| 69 | 69 | $resolver->setRequired('type'); |
| 70 | 70 | $resolver->setAllowedValues('type', ['text', 'memo', 'currency', 'boolean', 'number', 'datetime', 'integer', 'list']); |
| 71 | - $resolver->setNormalizer('value', function ($options, $value) { |
|
| 71 | + $resolver->setNormalizer('value', function($options, $value) { |
|
| 72 | 72 | $normalizer = $options['type']; |
| 73 | 73 | |
| 74 | 74 | // date for datetime |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | // validate / format options |
| 58 | 58 | $resolver->setRequired('type'); |
| 59 | 59 | $resolver->setNormalizer('type', $this->normalizerFactory->getClosure('list_request_type')); |
| 60 | - $resolver->setDefault('namespace', function (Options $options) { |
|
| 60 | + $resolver->setDefault('namespace', function(Options $options) { |
|
| 61 | 61 | if ('Stock' == $options['type']) { |
| 62 | 62 | return 'lStk'; |
| 63 | 63 | } |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | |
| 32 | 32 | // process suppliers |
| 33 | 33 | if (isset($data['suppliers']) && is_array($data['suppliers'])) { |
| 34 | - $data['suppliers'] = \array_map(function ($supplier) { |
|
| 34 | + $data['suppliers'] = \array_map(function($supplier) { |
|
| 35 | 35 | $SupplierItem = new Supplier\SupplierItem($this->namespacesPaths, $this->sanitizeEncoding, $this->companyRegistrationNumber, $this->resolveOptions, $this->normalizerFactory); |
| 36 | 36 | return $SupplierItem->setDirectionalVariable($this->useOneDirectionalVariables)->setData($supplier['supplierItem']); |
| 37 | 37 | }, $data['suppliers']); |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | { |
| 30 | 30 | // process stockPriceItem |
| 31 | 31 | if (isset($data['stockPriceItem']) && is_array($data['stockPriceItem'])) { |
| 32 | - $data['stockPriceItem'] = \array_map(function ($stockPriceItem) { |
|
| 32 | + $data['stockPriceItem'] = \array_map(function($stockPriceItem) { |
|
| 33 | 33 | $price = new Price($this->namespacesPaths, $this->sanitizeEncoding, $this->companyRegistrationNumber, $this->resolveOptions, $this->normalizerFactory); |
| 34 | 34 | return $price->setDirectionalVariable($this->useOneDirectionalVariables)->setData($stockPriceItem['stockPrice']); |
| 35 | 35 | }, $data['stockPriceItem']); |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | abstract class AbstractNormalizer |
| 9 | 9 | { |
| 10 | 10 | public function __construct( |
| 11 | - protected readonly int|null $length, |
|
| 11 | + protected readonly int | null $length, |
|
| 12 | 12 | protected readonly bool $nullable, |
| 13 | 13 | ) {} |
| 14 | 14 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | // validate / format options |
| 109 | 109 | $resolver->setRequired('type'); |
| 110 | 110 | $resolver->setNormalizer('type', $this->normalizerFactory->getClosure('list_request_type')); |
| 111 | - $resolver->setDefault('namespace', function (Options $options) { |
|
| 111 | + $resolver->setDefault('namespace', function(Options $options) { |
|
| 112 | 112 | if ('Stock' == $options['type']) { |
| 113 | 113 | return 'lStk'; |
| 114 | 114 | } |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | return 'lst'; |
| 121 | 121 | }); |
| 122 | 122 | $resolver->setAllowedValues('orderType', [null, 'receivedOrder', 'issuedOrder']); |
| 123 | - $resolver->setDefault('orderType', function (Options $options) { |
|
| 123 | + $resolver->setDefault('orderType', function(Options $options) { |
|
| 124 | 124 | if ('Order' == $options['type']) { |
| 125 | 125 | return 'receivedOrder'; |
| 126 | 126 | } |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | return null; |
| 129 | 129 | }); |
| 130 | 130 | $resolver->setAllowedValues('invoiceType', [null, 'issuedInvoice', 'issuedCreditNotice', 'issuedDebitNote', 'issuedAdvanceInvoice', 'receivable', 'issuedProformaInvoice', 'penalty', 'issuedCorrectiveTax', 'receivedInvoice', 'receivedCreditNotice', 'receivedDebitNote', 'receivedAdvanceInvoice', 'commitment', 'receivedProformaInvoice', 'receivedCorrectiveTax']); |
| 131 | - $resolver->setDefault('invoiceType', function (Options $options) { |
|
| 131 | + $resolver->setDefault('invoiceType', function(Options $options) { |
|
| 132 | 132 | if ('Invoice' == $options['type']) { |
| 133 | 133 | return 'issuedInvoice'; |
| 134 | 134 | } |