@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | protected readonly Pohoda\Common\CompanyRegistrationNumberInterface $companyRegistrationNumber; |
| 85 | 85 | |
| 86 | 86 | public function __construct( |
| 87 | - string|Pohoda\Common\CompanyRegistrationNumberInterface $companyRegistrationNumber, |
|
| 87 | + string | Pohoda\Common\CompanyRegistrationNumberInterface $companyRegistrationNumber, |
|
| 88 | 88 | ?Pohoda\DI\DependenciesFactory $dependenciesFactory = null, |
| 89 | 89 | ?Pohoda\ValueTransformer\SanitizeEncoding $sanitizeEncoding = new Pohoda\ValueTransformer\SanitizeEncoding(new Pohoda\ValueTransformer\Listing()), |
| 90 | 90 | ?Pohoda\Common\NamespacesPaths $namespacesPaths = new Pohoda\Common\NamespacesPaths(), |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | * |
| 211 | 211 | * @return int|string written bytes for file or XML string for memory |
| 212 | 212 | */ |
| 213 | - public function close(): int|string |
|
| 213 | + public function close(): int | string |
|
| 214 | 214 | { |
| 215 | 215 | $this->xmlWriter->endElement(); |
| 216 | 216 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | |
| 42 | 42 | // process suppliers |
| 43 | 43 | if (isset($data['suppliers']) && is_array($data['suppliers'])) { |
| 44 | - $data['suppliers'] = \array_map(function ($supplier) { |
|
| 44 | + $data['suppliers'] = \array_map(function($supplier) { |
|
| 45 | 45 | $supplierItem = new Supplier\SupplierItem($this->dependenciesFactory); |
| 46 | 46 | $supplierItem |
| 47 | 47 | ->setDirectionalVariable($this->useOneDirectionalVariables) |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | // validate / format options |
| 171 | 171 | $resolver->setRequired('type'); |
| 172 | 172 | $resolver->setNormalizer('type', $this->dependenciesFactory->getNormalizerFactory()->getClosure('list_request_type')); |
| 173 | - $resolver->setDefault('namespace', function (Options $options) { |
|
| 173 | + $resolver->setDefault('namespace', function(Options $options) { |
|
| 174 | 174 | if ('Stock' == $options['type']) { |
| 175 | 175 | return 'lStk'; |
| 176 | 176 | } |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | return 'lst'; |
| 183 | 183 | }); |
| 184 | 184 | $resolver->setAllowedValues('orderType', [null, 'receivedOrder', 'issuedOrder']); |
| 185 | - $resolver->setDefault('orderType', function (Options $options) { |
|
| 185 | + $resolver->setDefault('orderType', function(Options $options) { |
|
| 186 | 186 | if ('Order' == $options['type']) { |
| 187 | 187 | return 'receivedOrder'; |
| 188 | 188 | } |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | return null; |
| 191 | 191 | }); |
| 192 | 192 | $resolver->setAllowedValues('invoiceType', [null, 'issuedInvoice', 'issuedCreditNotice', 'issuedDebitNote', 'issuedAdvanceInvoice', 'receivable', 'issuedProformaInvoice', 'penalty', 'issuedCorrectiveTax', 'receivedInvoice', 'receivedCreditNotice', 'receivedDebitNote', 'receivedAdvanceInvoice', 'commitment', 'receivedProformaInvoice', 'receivedCorrectiveTax']); |
| 193 | - $resolver->setDefault('invoiceType', function (Options $options) { |
|
| 193 | + $resolver->setDefault('invoiceType', function(Options $options) { |
|
| 194 | 194 | if ('Invoice' == $options['type']) { |
| 195 | 195 | return 'issuedInvoice'; |
| 196 | 196 | } |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | // validate / format options |
| 259 | 259 | $resolver->setRequired('type'); |
| 260 | 260 | $resolver->setNormalizer('type', $this->dependenciesFactory->getNormalizerFactory()->getClosure('list_request_type')); |
| 261 | - $resolver->setDefault('namespace', function (Options $options) { |
|
| 261 | + $resolver->setDefault('namespace', function(Options $options) { |
|
| 262 | 262 | if ('Stock' == $options['type']) { |
| 263 | 263 | return 'lStk'; |
| 264 | 264 | } |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | return 'lst'; |
| 287 | 287 | }); |
| 288 | 288 | $resolver->setAllowedValues('orderType', [null, 'receivedOrder', 'issuedOrder']); |
| 289 | - $resolver->setDefault('orderType', function (Options $options) { |
|
| 289 | + $resolver->setDefault('orderType', function(Options $options) { |
|
| 290 | 290 | if ('Order' == $options['type']) { |
| 291 | 291 | return 'receivedOrder'; |
| 292 | 292 | } |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | return null; |
| 295 | 295 | }); |
| 296 | 296 | $resolver->setAllowedValues('invoiceType', [null, 'issuedInvoice', 'issuedCreditNotice', 'issuedDebitNote', 'issuedAdvanceInvoice', 'receivable', 'issuedProformaInvoice', 'penalty', 'issuedCorrectiveTax', 'receivedInvoice', 'receivedCreditNotice', 'receivedDebitNote', 'receivedAdvanceInvoice', 'commitment', 'receivedProformaInvoice', 'receivedCorrectiveTax']); |
| 297 | - $resolver->setDefault('invoiceType', function (Options $options) { |
|
| 297 | + $resolver->setDefault('invoiceType', function(Options $options) { |
|
| 298 | 298 | if ('Invoice' == $options['type']) { |
| 299 | 299 | return 'issuedInvoice'; |
| 300 | 300 | } |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | protected function createXML(): SimpleXMLElement |
| 114 | 114 | { |
| 115 | 115 | $np = $this->dependenciesFactory->getNamespacePaths()->allNamespaces(); |
| 116 | - return new SimpleXMLElement('<?xml version="1.0" encoding="' . $this->dependenciesFactory->getSanitizeEncoding()->getEncoding() . '"?><root ' . \implode(' ', \array_map(function ($k, $v) { |
|
| 116 | + return new SimpleXMLElement('<?xml version="1.0" encoding="' . $this->dependenciesFactory->getSanitizeEncoding()->getEncoding() . '"?><root ' . \implode(' ', \array_map(function($k, $v) { |
|
| 117 | 117 | return 'xmlns:' . $k . '="' . $v . '"'; |
| 118 | 118 | }, \array_keys($np), \array_values($np))) . '></root>'); |
| 119 | 119 | } |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | return \htmlspecialchars( |
| 262 | 262 | \array_reduce( |
| 263 | 263 | $sanitizeEncoding->getListing()->getTransformers(), |
| 264 | - function (string $value, ValueTransformerInterface $transformer): string { |
|
| 264 | + function(string $value, ValueTransformerInterface $transformer): string { |
|
| 265 | 265 | return $transformer->transform($value); |
| 266 | 266 | }, |
| 267 | 267 | strval($value), |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | protected function getChildNamespacePrefix(string $defaultPrefix): string |
| 337 | 337 | { |
| 338 | 338 | if (!empty($this->getImportRoot()) && $this->directionAsResponse) { |
| 339 | - list($prefix, ) = explode(':', $this->getImportRoot()); |
|
| 339 | + list($prefix,) = explode(':', $this->getImportRoot()); |
|
| 340 | 340 | return $prefix; |
| 341 | 341 | } |
| 342 | 342 | return $defaultPrefix; |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | { |
| 42 | 42 | // process stockPriceItem |
| 43 | 43 | if (isset($data['stockPriceItem']) && is_array($data['stockPriceItem'])) { |
| 44 | - $data['stockPriceItem'] = \array_map(function ($stockPriceItem) { |
|
| 44 | + $data['stockPriceItem'] = \array_map(function($stockPriceItem) { |
|
| 45 | 45 | $price = new Price($this->dependenciesFactory); |
| 46 | 46 | $price->setDirectionalVariable($this->useOneDirectionalVariables) |
| 47 | 47 | ->setResolveOptions($this->resolveOptions) |