@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | public function toXML(DOMDocument $document, ?string $prefix = null, ?string $type = null): DOMElement |
116 | 116 | { |
117 | - $typeElement = $document->createElement((string)$type); |
|
117 | + $typeElement = $document->createElement((string) $type); |
|
118 | 118 | |
119 | 119 | if ($this->product !== null) { |
120 | 120 | $typeElement->appendChild( |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | |
133 | 133 | if ($this->weight !== null) { |
134 | 134 | $typeElement->appendChild( |
135 | - $document->createElement(XmlHelper::getPrefixedTagName('weight', $prefix), (string)$this->weight) |
|
135 | + $document->createElement(XmlHelper::getPrefixedTagName('weight', $prefix), (string) $this->weight) |
|
136 | 136 | ); |
137 | 137 | } |
138 | 138 | |
@@ -168,8 +168,8 @@ discard block |
||
168 | 168 | throw new BpostException('Set an instance of National'); |
169 | 169 | } |
170 | 170 | |
171 | - if (isset($nationalXml->product) && (string)$nationalXml->product !== '') { |
|
172 | - $self->setProduct((string)$nationalXml->product); |
|
171 | + if (isset($nationalXml->product) && (string) $nationalXml->product !== '') { |
|
172 | + $self->setProduct((string) $nationalXml->product); |
|
173 | 173 | } |
174 | 174 | |
175 | 175 | if (!empty($nationalXml->options)) { |
@@ -195,18 +195,18 @@ discard block |
||
195 | 195 | } |
196 | 196 | } |
197 | 197 | |
198 | - if (isset($nationalXml->weight) && (string)$nationalXml->weight !== '') { |
|
199 | - $self->setWeight((int)$nationalXml->weight); |
|
198 | + if (isset($nationalXml->weight) && (string) $nationalXml->weight !== '') { |
|
199 | + $self->setWeight((int) $nationalXml->weight); |
|
200 | 200 | } |
201 | 201 | |
202 | - if (isset($nationalXml->openingHours) && (string)$nationalXml->openingHours !== '') { |
|
202 | + if (isset($nationalXml->openingHours) && (string) $nationalXml->openingHours !== '') { |
|
203 | 203 | foreach ($nationalXml->openingHours->children() as $day => $value) { |
204 | - $self->addOpeningHour(new Day((string)$day, (string)$value)); |
|
204 | + $self->addOpeningHour(new Day((string) $day, (string) $value)); |
|
205 | 205 | } |
206 | 206 | } |
207 | 207 | |
208 | - if (isset($nationalXml->desiredDeliveryPlace) && (string)$nationalXml->desiredDeliveryPlace !== '') { |
|
209 | - $self->setDesiredDeliveryPlace((string)$nationalXml->desiredDeliveryPlace); |
|
208 | + if (isset($nationalXml->desiredDeliveryPlace) && (string) $nationalXml->desiredDeliveryPlace !== '') { |
|
209 | + $self->setDesiredDeliveryPlace((string) $nationalXml->desiredDeliveryPlace); |
|
210 | 210 | } |
211 | 211 | |
212 | 212 | return $self; |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | */ |
218 | 218 | protected static function getOptionFromOptionData(SimpleXMLElement $optionData): Option |
219 | 219 | { |
220 | - $className = '\\Bpost\\BpostApiClient\\Bpost\\Order\\Box\\Option\\' . ucfirst($optionData->getName()); |
|
220 | + $className = '\\Bpost\\BpostApiClient\\Bpost\\Order\\Box\\Option\\'.ucfirst($optionData->getName()); |
|
221 | 221 | XmlHelper::assertMethodCreateFromXmlExists($className); |
222 | 222 | |
223 | 223 | /** @var callable $factory */ |