@@ -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 | |
@@ -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 | |
@@ -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 | ); |
@@ -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 | } |
@@ -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) |