@@ -112,6 +112,6 @@ |
||
| 112 | 112 | |
| 113 | 113 | protected function getRootAttributes() |
| 114 | 114 | { |
| 115 | - return ['type' => $this->getType(), 'display' => $this->getDisplay()]; |
|
| 115 | + return [ 'type' => $this->getType(), 'display' => $this->getDisplay() ]; |
|
| 116 | 116 | } |
| 117 | 117 | } |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | { |
| 84 | 84 | return array_merge( |
| 85 | 85 | parent::getRootAttributes(), |
| 86 | - ['shippedQuantity' => $this->getShippedQuantity()] |
|
| 86 | + [ 'shippedQuantity' => $this->getShippedQuantity() ] |
|
| 87 | 87 | ); |
| 88 | 88 | } |
| 89 | 89 | |
@@ -113,8 +113,7 @@ |
||
| 113 | 113 | protected function serializeShipmentMethod() |
| 114 | 114 | { |
| 115 | 115 | $serializedAttribute = $this->getShipmentMethodDisplayText() ? |
| 116 | - " displayText=\"{$this->getShipmentMethodDisplayText()}\"" : |
|
| 117 | - ''; |
|
| 116 | + " displayText=\"{$this->getShipmentMethodDisplayText()}\"" : ''; |
|
| 118 | 117 | return sprintf( |
| 119 | 118 | '<ShipmentMethod%s>%s</ShipmentMethod>', |
| 120 | 119 | $serializedAttribute, |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | $this->schemaValidate($serializedPayload); |
| 72 | 72 | $ele = new SimpleXMLElement($serializedPayload); |
| 73 | 73 | return $this |
| 74 | - ->setTimestamp(new DateTime($ele['timestamp'])) |
|
| 74 | + ->setTimestamp(new DateTime($ele[ 'timestamp' ])) |
|
| 75 | 75 | ->validate(); |
| 76 | 76 | } |
| 77 | 77 | |
@@ -20,11 +20,11 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | class PayloadMap implements IPayloadMap |
| 22 | 22 | { |
| 23 | - protected $classMap = []; |
|
| 23 | + protected $classMap = [ ]; |
|
| 24 | 24 | /** @var SplStack */ |
| 25 | 25 | protected $overrides; |
| 26 | 26 | |
| 27 | - public function __construct(array $classMap = []) |
|
| 27 | + public function __construct(array $classMap = [ ]) |
|
| 28 | 28 | { |
| 29 | 29 | $this->classMap = $classMap; |
| 30 | 30 | $this->overrides = new SplStack; |
@@ -36,8 +36,8 @@ discard block |
||
| 36 | 36 | if ($override) { |
| 37 | 37 | return $override->getConcreteType($abstractType); |
| 38 | 38 | } |
| 39 | - if (isset($this->classMap[$abstractType])) { |
|
| 40 | - return $this->classMap[$abstractType]; |
|
| 39 | + if (isset($this->classMap[ $abstractType ])) { |
|
| 40 | + return $this->classMap[ $abstractType ]; |
|
| 41 | 41 | } |
| 42 | 42 | throw new UnsupportedPayload("No concrete type known for '$abstractType'"); |
| 43 | 43 | } |
@@ -65,6 +65,6 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | public function hasMappingForType($abstractType) |
| 67 | 67 | { |
| 68 | - return $this->getOverrideWithMapping($abstractType) || isset($this->classMap[$abstractType]); |
|
| 68 | + return $this->getOverrideWithMapping($abstractType) || isset($this->classMap[ $abstractType ]); |
|
| 69 | 69 | } |
| 70 | 70 | } |
@@ -56,9 +56,9 @@ discard block |
||
| 56 | 56 | self::AUTHORIZATION_TIMEOUT_CARD_PROCESSOR => self::TIMEOUT_RESPONSE_CODE, |
| 57 | 57 | ]; |
| 58 | 58 | /** @var string[] AVS response codes that should be rejected */ |
| 59 | - protected $invalidAvsCodes = ['N', 'AW']; |
|
| 59 | + protected $invalidAvsCodes = [ 'N', 'AW' ]; |
|
| 60 | 60 | /** @var string[] CVV response codes that should be rejected */ |
| 61 | - protected $invalidCvvCodes = ['N']; |
|
| 61 | + protected $invalidCvvCodes = [ 'N' ]; |
|
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | 64 | * @param IValidatorIterator |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | public function getResponseCode() |
| 166 | 166 | { |
| 167 | 167 | $responseCode = $this->getAuthorizationResponseCode(); |
| 168 | - return isset($this->responseCodeMap[$responseCode]) ? $this->responseCodeMap[$responseCode] : null; |
|
| 168 | + return isset($this->responseCodeMap[ $responseCode ]) ? $this->responseCodeMap[ $responseCode ] : null; |
|
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | /** |
@@ -113,6 +113,6 @@ |
||
| 113 | 113 | */ |
| 114 | 114 | protected function getRootAttributes() |
| 115 | 115 | { |
| 116 | - return []; |
|
| 116 | + return [ ]; |
|
| 117 | 117 | } |
| 118 | 118 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | |
| 35 | 35 | protected $responseCode; |
| 36 | 36 | /** @var array response codes that are considered a success */ |
| 37 | - protected $successResponseCodes = ['Success']; |
|
| 37 | + protected $successResponseCodes = [ 'Success' ]; |
|
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | 40 | * @param IValidatorIterator |
@@ -58,12 +58,12 @@ |
||
| 58 | 58 | */ |
| 59 | 59 | protected function serializeBillingAddress() |
| 60 | 60 | { |
| 61 | - $lines = []; |
|
| 62 | - $billingLines = is_array($this->billingLines) ? $this->billingLines : []; |
|
| 61 | + $lines = [ ]; |
|
| 62 | + $billingLines = is_array($this->billingLines) ? $this->billingLines : [ ]; |
|
| 63 | 63 | $idx = 0; |
| 64 | 64 | foreach ($billingLines as $line) { |
| 65 | 65 | $idx++; |
| 66 | - $lines[] = sprintf( |
|
| 66 | + $lines[ ] = sprintf( |
|
| 67 | 67 | '<Line%d>%s</Line%1$d>', |
| 68 | 68 | $idx, |
| 69 | 69 | $this->xmlEncode($line) |