@@ -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 | } |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | protected function createXML(): SimpleXMLElement |
| 108 | 108 | { |
| 109 | 109 | $np = $this->namespacesPaths->allNamespaces(); |
| 110 | - return new SimpleXMLElement('<?xml version="1.0" encoding="' . $this->sanitizeEncoding->getEncoding() . '"?><root ' . \implode(' ', \array_map(function ($k, $v) { |
|
| 110 | + return new SimpleXMLElement('<?xml version="1.0" encoding="' . $this->sanitizeEncoding->getEncoding() . '"?><root ' . \implode(' ', \array_map(function($k, $v) { |
|
| 111 | 111 | return 'xmlns:' . $k . '="' . $v . '"'; |
| 112 | 112 | }, \array_keys($np), \array_values($np))) . '></root>'); |
| 113 | 113 | } |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | return \htmlspecialchars( |
| 252 | 252 | \array_reduce( |
| 253 | 253 | $this->sanitizeEncoding->getListing()->getTransformers(), |
| 254 | - function (string $value, ValueTransformerInterface $transformer): string { |
|
| 254 | + function(string $value, ValueTransformerInterface $transformer): string { |
|
| 255 | 255 | return $transformer->transform($value); |
| 256 | 256 | }, |
| 257 | 257 | strval($value) |
@@ -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 |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | abstract class AbstractNormalizer |
| 10 | 10 | { |
| 11 | 11 | public function __construct( |
| 12 | - protected readonly int|null $length, |
|
| 12 | + protected readonly int | null $length, |
|
| 13 | 13 | protected readonly bool $nullable, |
| 14 | 14 | ) |
| 15 | 15 | { |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | { |
| 38 | 38 | // process stockPriceItem |
| 39 | 39 | if (isset($data['stockPriceItem']) && is_array($data['stockPriceItem'])) { |
| 40 | - $data['stockPriceItem'] = \array_map(function ($stockPriceItem) use ($namespacesPaths, $sanitizeEncoding, $companyRegistrationNumber, $resolveOptions) { |
|
| 40 | + $data['stockPriceItem'] = \array_map(function($stockPriceItem) use ($namespacesPaths, $sanitizeEncoding, $companyRegistrationNumber, $resolveOptions) { |
|
| 41 | 41 | return new Price($namespacesPaths, $sanitizeEncoding, $stockPriceItem['stockPrice'], $companyRegistrationNumber, $resolveOptions); |
| 42 | 42 | }, $data['stockPriceItem']); |
| 43 | 43 | } |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | |
| 41 | 41 | // process suppliers |
| 42 | 42 | if (isset($data['suppliers']) && is_array($data['suppliers'])) { |
| 43 | - $data['suppliers'] = \array_map(function ($supplier) use ($namespacesPaths, $sanitizeEncoding, $companyRegistrationNumber, $resolveOptions) { |
|
| 43 | + $data['suppliers'] = \array_map(function($supplier) use ($namespacesPaths, $sanitizeEncoding, $companyRegistrationNumber, $resolveOptions) { |
|
| 44 | 44 | return new Supplier\SupplierItem($namespacesPaths, $sanitizeEncoding, $supplier['supplierItem'], $companyRegistrationNumber, $resolveOptions); |
| 45 | 45 | }, $data['suppliers']); |
| 46 | 46 | } |