@@ -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 |
@@ -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 | } |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | protected function createXML(): SimpleXMLElement |
| 121 | 121 | { |
| 122 | 122 | $np = $this->namespacesPaths->allNamespaces(); |
| 123 | - return new SimpleXMLElement('<?xml version="1.0" encoding="' . $this->sanitizeEncoding->getEncoding() . '"?><root ' . \implode(' ', \array_map(function ($k, $v) { |
|
| 123 | + return new SimpleXMLElement('<?xml version="1.0" encoding="' . $this->sanitizeEncoding->getEncoding() . '"?><root ' . \implode(' ', \array_map(function($k, $v) { |
|
| 124 | 124 | return 'xmlns:' . $k . '="' . $v . '"'; |
| 125 | 125 | }, \array_keys($np), \array_values($np))) . '></root>'); |
| 126 | 126 | } |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | return \htmlspecialchars( |
| 268 | 268 | \array_reduce( |
| 269 | 269 | $this->sanitizeEncoding->getListing()->getTransformers(), |
| 270 | - function (string $value, ValueTransformerInterface $transformer): string { |
|
| 270 | + function(string $value, ValueTransformerInterface $transformer): string { |
|
| 271 | 271 | return $transformer->transform($value); |
| 272 | 272 | }, |
| 273 | 273 | strval($value), |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | protected function getChildNamespacePrefix(string $defaultPrefix): string |
| 343 | 343 | { |
| 344 | 344 | if (!empty($this->getImportRoot()) && $this->directionAsResponse) { |
| 345 | - list($prefix, ) = explode(':', $this->getImportRoot()); |
|
| 345 | + list($prefix,) = explode(':', $this->getImportRoot()); |
|
| 346 | 346 | return $prefix; |
| 347 | 347 | } |
| 348 | 348 | return $defaultPrefix; |
@@ -154,7 +154,7 @@ |
||
| 154 | 154 | { |
| 155 | 155 | $namespace = empty($this->namespace) ? 'stk' : $this->namespace; |
| 156 | 156 | $xml = $this->createXML()->addChild( |
| 157 | - ($this->useOneDirectionalVariables ? $namespace : 'stk'). ':stock', |
|
| 157 | + ($this->useOneDirectionalVariables ? $namespace : 'stk') . ':stock', |
|
| 158 | 158 | '', |
| 159 | 159 | $this->namespace(($this->useOneDirectionalVariables ? $namespace : 'stk')), |
| 160 | 160 | ); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | protected readonly Pohoda\Common\CompanyRegistrationNumberInterface $companyRegistrationNumber; |
| 84 | 84 | |
| 85 | 85 | public function __construct( |
| 86 | - string|Pohoda\Common\CompanyRegistrationNumberInterface $companyRegistrationNumber, |
|
| 86 | + string | Pohoda\Common\CompanyRegistrationNumberInterface $companyRegistrationNumber, |
|
| 87 | 87 | protected Pohoda\ValueTransformer\SanitizeEncoding $sanitizeEncoding = new Pohoda\ValueTransformer\SanitizeEncoding(new Pohoda\ValueTransformer\Listing()), |
| 88 | 88 | protected readonly Pohoda\Common\NamespacesPaths $namespacesPaths = new Pohoda\Common\NamespacesPaths(), |
| 89 | 89 | ) { |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | * |
| 198 | 198 | * @return int|string written bytes for file or XML string for memory |
| 199 | 199 | */ |
| 200 | - public function close(): int|string |
|
| 200 | + public function close(): int | string |
|
| 201 | 201 | { |
| 202 | 202 | $this->xmlWriter->endElement(); |
| 203 | 203 | |
@@ -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->normalizerFactory); |
| 34 | 34 | $price->setDirectionalVariable($this->useOneDirectionalVariables)->setResolveOptions($this->resolveOptions)->setData($stockPriceItem['stockPrice']); |
| 35 | 35 | return $price; |