@@ -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 |
@@ -38,103 +38,103 @@ |
||
38 | 38 | } |
39 | 39 | // process checkbox2 |
40 | 40 | if (isset($data['checkbox2'])) { |
41 | - $data['checkbox2'] = new Checkbox2($namespacesPaths, $sanitizeEncoding, $data['checkbox2'], $ico, $resolveOptions); |
|
41 | + $data['checkbox2'] = new Checkbox2($namespacesPaths, $sanitizeEncoding, $data['checkbox2'], $ico, $resolveOptions); |
|
42 | 42 | } |
43 | 43 | // process checkbox3 |
44 | 44 | if (isset($data['checkbox3'])) { |
45 | - $data['checkbox3'] = new Checkbox3($namespacesPaths, $sanitizeEncoding, $data['checkbox3'], $ico, $resolveOptions); |
|
45 | + $data['checkbox3'] = new Checkbox3($namespacesPaths, $sanitizeEncoding, $data['checkbox3'], $ico, $resolveOptions); |
|
46 | 46 | } |
47 | 47 | // process checkbox4 |
48 | 48 | if (isset($data['checkbox4'])) { |
49 | - $data['checkbox4'] = new Checkbox4($namespacesPaths, $sanitizeEncoding, $data['checkbox4'], $ico, $resolveOptions); |
|
49 | + $data['checkbox4'] = new Checkbox4($namespacesPaths, $sanitizeEncoding, $data['checkbox4'], $ico, $resolveOptions); |
|
50 | 50 | } |
51 | 51 | // process checkbox5 |
52 | 52 | if (isset($data['checkbox5'])) { |
53 | - $data['checkbox5'] = new Checkbox5($namespacesPaths, $sanitizeEncoding, $data['checkbox5'], $ico, $resolveOptions); |
|
53 | + $data['checkbox5'] = new Checkbox5($namespacesPaths, $sanitizeEncoding, $data['checkbox5'], $ico, $resolveOptions); |
|
54 | 54 | } |
55 | 55 | // process checkbox6 |
56 | 56 | if (isset($data['checkbox6'])) { |
57 | - $data['checkbox6'] = new Checkbox6($namespacesPaths, $sanitizeEncoding, $data['checkbox6'], $ico, $resolveOptions); |
|
57 | + $data['checkbox6'] = new Checkbox6($namespacesPaths, $sanitizeEncoding, $data['checkbox6'], $ico, $resolveOptions); |
|
58 | 58 | } |
59 | 59 | // process checkbox7 |
60 | 60 | if (isset($data['checkbox7'])) { |
61 | - $data['checkbox7'] = new Checkbox7($namespacesPaths, $sanitizeEncoding, $data['checkbox7'], $ico, $resolveOptions); |
|
61 | + $data['checkbox7'] = new Checkbox7($namespacesPaths, $sanitizeEncoding, $data['checkbox7'], $ico, $resolveOptions); |
|
62 | 62 | } |
63 | 63 | // process checkbox8 |
64 | 64 | if (isset($data['checkbox8'])) { |
65 | - $data['checkbox8'] = new Checkbox8($namespacesPaths, $sanitizeEncoding, $data['checkbox8'], $ico, $resolveOptions); |
|
65 | + $data['checkbox8'] = new Checkbox8($namespacesPaths, $sanitizeEncoding, $data['checkbox8'], $ico, $resolveOptions); |
|
66 | 66 | } |
67 | 67 | // process radioButton1 |
68 | 68 | if (isset($data['radioButton1'])) { |
69 | - $data['radioButton1'] = new RadioButton1($namespacesPaths, $sanitizeEncoding, $data['radioButton1'], $ico, $resolveOptions); |
|
69 | + $data['radioButton1'] = new RadioButton1($namespacesPaths, $sanitizeEncoding, $data['radioButton1'], $ico, $resolveOptions); |
|
70 | 70 | } |
71 | 71 | // process spin1 |
72 | 72 | if (isset($data['spin1'])) { |
73 | - $data['spin1'] = new Spin1($namespacesPaths, $sanitizeEncoding, $data['spin1'], $ico, $resolveOptions); |
|
73 | + $data['spin1'] = new Spin1($namespacesPaths, $sanitizeEncoding, $data['spin1'], $ico, $resolveOptions); |
|
74 | 74 | } |
75 | 75 | // process currency1 |
76 | 76 | if (isset($data['currency1'])) { |
77 | - $data['currency1'] = new Currency1($namespacesPaths, $sanitizeEncoding, $data['currency1'], $ico, $resolveOptions); |
|
77 | + $data['currency1'] = new Currency1($namespacesPaths, $sanitizeEncoding, $data['currency1'], $ico, $resolveOptions); |
|
78 | 78 | } |
79 | 79 | // process month1 |
80 | 80 | if (isset($data['month1'])) { |
81 | - $data['month1'] = new Month1($namespacesPaths, $sanitizeEncoding, $data['month1'], $ico, $resolveOptions); |
|
81 | + $data['month1'] = new Month1($namespacesPaths, $sanitizeEncoding, $data['month1'], $ico, $resolveOptions); |
|
82 | 82 | } |
83 | 83 | // process month2 |
84 | 84 | if (isset($data['month2'])) { |
85 | - $data['month2'] = new Month2($namespacesPaths, $sanitizeEncoding, $data['month2'], $ico, $resolveOptions); |
|
85 | + $data['month2'] = new Month2($namespacesPaths, $sanitizeEncoding, $data['month2'], $ico, $resolveOptions); |
|
86 | 86 | } |
87 | 87 | // process year1 |
88 | 88 | if (isset($data['year1'])) { |
89 | - $data['year1'] = new Year1($namespacesPaths, $sanitizeEncoding, $data['year1'], $ico, $resolveOptions); |
|
89 | + $data['year1'] = new Year1($namespacesPaths, $sanitizeEncoding, $data['year1'], $ico, $resolveOptions); |
|
90 | 90 | } |
91 | 91 | // process date1 |
92 | 92 | if (isset($data['date1'])) { |
93 | - $data['date1'] = new Date1($namespacesPaths, $sanitizeEncoding, $data['date1'], $ico, $resolveOptions); |
|
93 | + $data['date1'] = new Date1($namespacesPaths, $sanitizeEncoding, $data['date1'], $ico, $resolveOptions); |
|
94 | 94 | } |
95 | 95 | // process date2 |
96 | 96 | if (isset($data['date2'])) { |
97 | - $data['date2'] = new Date2($namespacesPaths, $sanitizeEncoding, $data['date2'], $ico, $resolveOptions); |
|
97 | + $data['date2'] = new Date2($namespacesPaths, $sanitizeEncoding, $data['date2'], $ico, $resolveOptions); |
|
98 | 98 | } |
99 | 99 | // process date3 |
100 | 100 | if (isset($data['date3'])) { |
101 | - $data['date3'] = new Date3($namespacesPaths, $sanitizeEncoding, $data['date3'], $ico, $resolveOptions); |
|
101 | + $data['date3'] = new Date3($namespacesPaths, $sanitizeEncoding, $data['date3'], $ico, $resolveOptions); |
|
102 | 102 | } |
103 | 103 | // process date4 |
104 | 104 | if (isset($data['date4'])) { |
105 | - $data['date4'] = new Date4($namespacesPaths, $sanitizeEncoding, $data['date4'], $ico, $resolveOptions); |
|
105 | + $data['date4'] = new Date4($namespacesPaths, $sanitizeEncoding, $data['date4'], $ico, $resolveOptions); |
|
106 | 106 | } |
107 | 107 | // process text1 |
108 | 108 | if (isset($data['text1'])) { |
109 | - $data['text1'] = new Text1($namespacesPaths, $sanitizeEncoding, $data['text1'], $ico, $resolveOptions); |
|
109 | + $data['text1'] = new Text1($namespacesPaths, $sanitizeEncoding, $data['text1'], $ico, $resolveOptions); |
|
110 | 110 | } |
111 | 111 | // process text2 |
112 | 112 | if (isset($data['text2'])) { |
113 | - $data['text2'] = new Text2($namespacesPaths, $sanitizeEncoding, $data['text2'], $ico, $resolveOptions); |
|
113 | + $data['text2'] = new Text2($namespacesPaths, $sanitizeEncoding, $data['text2'], $ico, $resolveOptions); |
|
114 | 114 | } |
115 | 115 | // process text3 |
116 | 116 | if (isset($data['text3'])) { |
117 | - $data['text3'] = new Text3($namespacesPaths, $sanitizeEncoding, $data['text3'], $ico, $resolveOptions); |
|
117 | + $data['text3'] = new Text3($namespacesPaths, $sanitizeEncoding, $data['text3'], $ico, $resolveOptions); |
|
118 | 118 | } |
119 | 119 | // process combobox1 |
120 | 120 | if (isset($data['combobox1'])) { |
121 | - $data['combobox1'] = new Combobox1($namespacesPaths, $sanitizeEncoding, $data['combobox1'], $ico, $resolveOptions); |
|
121 | + $data['combobox1'] = new Combobox1($namespacesPaths, $sanitizeEncoding, $data['combobox1'], $ico, $resolveOptions); |
|
122 | 122 | } |
123 | 123 | // process combobox2 |
124 | 124 | if (isset($data['combobox2'])) { |
125 | - $data['combobox2'] = new Combobox2($namespacesPaths, $sanitizeEncoding, $data['combobox2'], $ico, $resolveOptions); |
|
125 | + $data['combobox2'] = new Combobox2($namespacesPaths, $sanitizeEncoding, $data['combobox2'], $ico, $resolveOptions); |
|
126 | 126 | } |
127 | 127 | // process combobox3 |
128 | 128 | if (isset($data['combobox3'])) { |
129 | - $data['combobox3'] = new Combobox3($namespacesPaths, $sanitizeEncoding, $data['combobox3'], $ico, $resolveOptions); |
|
129 | + $data['combobox3'] = new Combobox3($namespacesPaths, $sanitizeEncoding, $data['combobox3'], $ico, $resolveOptions); |
|
130 | 130 | } |
131 | 131 | // process comboboxEx1 |
132 | 132 | if (isset($data['comboboxEx1'])) { |
133 | - $data['comboboxEx1'] = new ComboboxEx1($namespacesPaths, $sanitizeEncoding, $data['comboboxEx1'], $ico, $resolveOptions); |
|
133 | + $data['comboboxEx1'] = new ComboboxEx1($namespacesPaths, $sanitizeEncoding, $data['comboboxEx1'], $ico, $resolveOptions); |
|
134 | 134 | } |
135 | 135 | // process comboboxEx2 |
136 | 136 | if (isset($data['comboboxEx2'])) { |
137 | - $data['comboboxEx2'] = new ComboboxEx2($namespacesPaths, $sanitizeEncoding, $data['comboboxEx2'], $ico, $resolveOptions); |
|
137 | + $data['comboboxEx2'] = new ComboboxEx2($namespacesPaths, $sanitizeEncoding, $data['comboboxEx2'], $ico, $resolveOptions); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | parent::__construct($namespacesPaths, $sanitizeEncoding, $data, $ico, $resolveOptions); |
@@ -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, $ico, $resolveOptions) { |
|
43 | + $data['suppliers'] = \array_map(function($supplier) use ($namespacesPaths, $sanitizeEncoding, $ico, $resolveOptions) { |
|
44 | 44 | return new Supplier\SupplierItem($namespacesPaths, $sanitizeEncoding, $supplier['supplierItem'], $ico, $resolveOptions); |
45 | 45 | }, $data['suppliers']); |
46 | 46 | } |
@@ -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 |
@@ -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, $ico, $resolveOptions) { |
|
40 | + $data['stockPriceItem'] = \array_map(function($stockPriceItem) use ($namespacesPaths, $sanitizeEncoding, $ico, $resolveOptions) { |
|
41 | 41 | return new Price($namespacesPaths, $sanitizeEncoding, $stockPriceItem['stockPrice'], $ico, $resolveOptions); |
42 | 42 | }, $data['stockPriceItem']); |
43 | 43 | } |