@@ -182,9 +182,9 @@ |
||
| 182 | 182 | protected function getRootAttributes() |
| 183 | 183 | { |
| 184 | 184 | $orderType = $this->getOrderType(); |
| 185 | - $attributes = ['xmlns' => $this->getXmlNamespace()]; |
|
| 185 | + $attributes = [ 'xmlns' => $this->getXmlNamespace() ]; |
|
| 186 | 186 | return $orderType |
| 187 | - ? array_merge($attributes, ['orderType' => $this->getOrderType()]) |
|
| 187 | + ? array_merge($attributes, [ 'orderType' => $this->getOrderType() ]) |
|
| 188 | 188 | : $attributes; |
| 189 | 189 | } |
| 190 | 190 | } |
@@ -117,6 +117,6 @@ |
||
| 117 | 117 | */ |
| 118 | 118 | protected function getRootAttributes() |
| 119 | 119 | { |
| 120 | - return ['xmlns' => $this->getXmlNamespace()]; |
|
| 120 | + return [ 'xmlns' => $this->getXmlNamespace() ]; |
|
| 121 | 121 | } |
| 122 | 122 | } |
@@ -72,8 +72,8 @@ |
||
| 72 | 72 | { |
| 73 | 73 | $xpath = $this->getPayloadAsXPath($serializedData); |
| 74 | 74 | foreach ($xpath->query($this->getSubpayloadXPath()) as $subpayloadNode) { |
| 75 | - if (isset($this->subpayloadNodeMap[$subpayloadNode->nodeName])) { |
|
| 76 | - $plFactoryMethod = $this->subpayloadNodeMap[$subpayloadNode->nodeName]; |
|
| 75 | + if (isset($this->subpayloadNodeMap[ $subpayloadNode->nodeName ])) { |
|
| 76 | + $plFactoryMethod = $this->subpayloadNodeMap[ $subpayloadNode->nodeName ]; |
|
| 77 | 77 | $pl = $this->$plFactoryMethod(); |
| 78 | 78 | } |
| 79 | 79 | if (isset($pl)) { |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | $this->logger = $logger; |
| 50 | 50 | $this->optionalExtractionPaths = array_merge( |
| 51 | 51 | $this->optionalExtractionPaths, |
| 52 | - ['brand' => 'x:Brand'] |
|
| 52 | + [ 'brand' => 'x:Brand' ] |
|
| 53 | 53 | ); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -137,8 +137,8 @@ |
||
| 137 | 137 | { |
| 138 | 138 | $isMockPayment = $this->getIsMockPayment(); |
| 139 | 139 | return !is_null($isMockPayment) |
| 140 | - ? ['isMockPayment' => $this->convertBooleanToString($isMockPayment)] |
|
| 141 | - : []; |
|
| 140 | + ? [ 'isMockPayment' => $this->convertBooleanToString($isMockPayment) ] |
|
| 141 | + : [ ]; |
|
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | protected function getRootNodeName() |
@@ -161,6 +161,6 @@ |
||
| 161 | 161 | protected function convertHMSToDateInterval($hmsTime) |
| 162 | 162 | { |
| 163 | 163 | $parts = explode(':', $hmsTime); |
| 164 | - return 'PT' . $parts[0] . 'H' . $parts[1] . 'M' . $parts[2] . 'S'; |
|
| 164 | + return 'PT' . $parts[ 0 ] . 'H' . $parts[ 1 ] . 'M' . $parts[ 2 ] . 'S'; |
|
| 165 | 165 | } |
| 166 | 166 | } |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | $this->logger = $logger; |
| 47 | 47 | $this->extractionPaths = array_merge( |
| 48 | 48 | $this->extractionPaths, |
| 49 | - ['id' => 'string(@id)'] |
|
| 49 | + [ 'id' => 'string(@id)' ] |
|
| 50 | 50 | ); |
| 51 | 51 | } |
| 52 | 52 | |
@@ -63,6 +63,6 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | protected function getRootAttributes() |
| 65 | 65 | { |
| 66 | - return ['id' => $this->getId()]; |
|
| 66 | + return [ 'id' => $this->getId() ]; |
|
| 67 | 67 | } |
| 68 | 68 | } |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | { |
| 78 | 78 | return array_merge( |
| 79 | 79 | parent::getRootAttributes(), |
| 80 | - ['remainingQuantity' => $this->getRemainingQuantity()] |
|
| 80 | + [ 'remainingQuantity' => $this->getRemainingQuantity() ] |
|
| 81 | 81 | ); |
| 82 | 82 | } |
| 83 | 83 | |
@@ -148,8 +148,8 @@ |
||
| 148 | 148 | 'feesAmount' => $this->getFeesAmount(), |
| 149 | 149 | 'discountAmount' => $this->getDiscountAmount(), |
| 150 | 150 | ]; |
| 151 | - $qualifyAttributes = function ($name) use ($attrs) { |
|
| 152 | - return sprintf('%s="%s"', $name, $this->formatAmount($attrs[$name] ?: 0)); |
|
| 151 | + $qualifyAttributes = function($name) use ($attrs) { |
|
| 152 | + return sprintf('%s="%s"', $name, $this->formatAmount($attrs[ $name ] ?: 0)); |
|
| 153 | 153 | }; |
| 154 | 154 | $qualifiedAttributes = array_map($qualifyAttributes, array_keys($attrs)); |
| 155 | 155 | return '<OrderSummary ' . implode(' ', $qualifiedAttributes) . '/>'; |