@@ -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 | } |
@@ -1,17 +1,17 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
4 | - * |
|
5 | - * NOTICE OF LICENSE |
|
6 | - * |
|
7 | - * This source file is subject to the Open Software License (OSL 3.0) |
|
8 | - * that is bundled with this package in the file LICENSE.md. |
|
9 | - * It is also available through the world-wide-web at this URL: |
|
10 | - * http://opensource.org/licenses/osl-3.0.php |
|
11 | - * |
|
12 | - * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
13 | - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
14 | - */ |
|
3 | + * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
4 | + * |
|
5 | + * NOTICE OF LICENSE |
|
6 | + * |
|
7 | + * This source file is subject to the Open Software License (OSL 3.0) |
|
8 | + * that is bundled with this package in the file LICENSE.md. |
|
9 | + * It is also available through the world-wide-web at this URL: |
|
10 | + * http://opensource.org/licenses/osl-3.0.php |
|
11 | + * |
|
12 | + * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
13 | + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
14 | + */ |
|
15 | 15 | |
16 | 16 | namespace eBayEnterprise\RetailOrderManagement\Payload; |
17 | 17 |
@@ -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 | /** |
@@ -23,7 +23,6 @@ |
||
23 | 23 | use eBayEnterprise\RetailOrderManagement\Payload\Payment\TAmount; |
24 | 24 | use eBayEnterprise\RetailOrderManagement\Payload\TPayload; |
25 | 25 | use Psr\Log\LoggerInterface; |
26 | -use Psr\Log\NullLogger; |
|
27 | 26 | |
28 | 27 | class TaxedPriceGroup implements ITaxedPriceGroup |
29 | 28 | { |
@@ -1,17 +1,17 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
4 | - * |
|
5 | - * NOTICE OF LICENSE |
|
6 | - * |
|
7 | - * This source file is subject to the Open Software License (OSL 3.0) |
|
8 | - * that is bundled with this package in the file LICENSE.md. |
|
9 | - * It is also available through the world-wide-web at this URL: |
|
10 | - * http://opensource.org/licenses/osl-3.0.php |
|
11 | - * |
|
12 | - * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
13 | - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
14 | - */ |
|
3 | + * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
4 | + * |
|
5 | + * NOTICE OF LICENSE |
|
6 | + * |
|
7 | + * This source file is subject to the Open Software License (OSL 3.0) |
|
8 | + * that is bundled with this package in the file LICENSE.md. |
|
9 | + * It is also available through the world-wide-web at this URL: |
|
10 | + * http://opensource.org/licenses/osl-3.0.php |
|
11 | + * |
|
12 | + * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
13 | + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
14 | + */ |
|
15 | 15 | |
16 | 16 | namespace eBayEnterprise\RetailOrderManagement\Payload; |
17 | 17 |
@@ -113,6 +113,6 @@ |
||
113 | 113 | */ |
114 | 114 | protected function getRootAttributes() |
115 | 115 | { |
116 | - return []; |
|
116 | + return [ ]; |
|
117 | 117 | } |
118 | 118 | } |
@@ -23,7 +23,6 @@ |
||
23 | 23 | use eBayEnterprise\RetailOrderManagement\Payload\Payment\TAmount; |
24 | 24 | use eBayEnterprise\RetailOrderManagement\Payload\TPayload; |
25 | 25 | use Psr\Log\LoggerInterface; |
26 | -use Psr\Log\NullLogger; |
|
27 | 26 | |
28 | 27 | class TaxedPriceGroup implements ITaxedPriceGroup |
29 | 28 | { |
@@ -1,17 +1,17 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
4 | - * |
|
5 | - * NOTICE OF LICENSE |
|
6 | - * |
|
7 | - * This source file is subject to the Open Software License (OSL 3.0) |
|
8 | - * that is bundled with this package in the file LICENSE.md. |
|
9 | - * It is also available through the world-wide-web at this URL: |
|
10 | - * http://opensource.org/licenses/osl-3.0.php |
|
11 | - * |
|
12 | - * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
13 | - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
14 | - */ |
|
3 | + * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
4 | + * |
|
5 | + * NOTICE OF LICENSE |
|
6 | + * |
|
7 | + * This source file is subject to the Open Software License (OSL 3.0) |
|
8 | + * that is bundled with this package in the file LICENSE.md. |
|
9 | + * It is also available through the world-wide-web at this URL: |
|
10 | + * http://opensource.org/licenses/osl-3.0.php |
|
11 | + * |
|
12 | + * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
13 | + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
14 | + */ |
|
15 | 15 | |
16 | 16 | namespace eBayEnterprise\RetailOrderManagement\Payload; |
17 | 17 |
@@ -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 |
@@ -23,7 +23,6 @@ |
||
23 | 23 | use eBayEnterprise\RetailOrderManagement\Payload\Payment\TAmount; |
24 | 24 | use eBayEnterprise\RetailOrderManagement\Payload\TPayload; |
25 | 25 | use Psr\Log\LoggerInterface; |
26 | -use Psr\Log\NullLogger; |
|
27 | 26 | |
28 | 27 | class TaxedPriceGroup implements ITaxedPriceGroup |
29 | 28 | { |
@@ -1,17 +1,17 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
4 | - * |
|
5 | - * NOTICE OF LICENSE |
|
6 | - * |
|
7 | - * This source file is subject to the Open Software License (OSL 3.0) |
|
8 | - * that is bundled with this package in the file LICENSE.md. |
|
9 | - * It is also available through the world-wide-web at this URL: |
|
10 | - * http://opensource.org/licenses/osl-3.0.php |
|
11 | - * |
|
12 | - * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
13 | - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
14 | - */ |
|
3 | + * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
4 | + * |
|
5 | + * NOTICE OF LICENSE |
|
6 | + * |
|
7 | + * This source file is subject to the Open Software License (OSL 3.0) |
|
8 | + * that is bundled with this package in the file LICENSE.md. |
|
9 | + * It is also available through the world-wide-web at this URL: |
|
10 | + * http://opensource.org/licenses/osl-3.0.php |
|
11 | + * |
|
12 | + * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
13 | + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
14 | + */ |
|
15 | 15 | |
16 | 16 | namespace eBayEnterprise\RetailOrderManagement\Payload; |
17 | 17 |
@@ -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) |
@@ -1,17 +1,17 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
4 | - * |
|
5 | - * NOTICE OF LICENSE |
|
6 | - * |
|
7 | - * This source file is subject to the Open Software License (OSL 3.0) |
|
8 | - * that is bundled with this package in the file LICENSE.md. |
|
9 | - * It is also available through the world-wide-web at this URL: |
|
10 | - * http://opensource.org/licenses/osl-3.0.php |
|
11 | - * |
|
12 | - * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
13 | - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
14 | - */ |
|
3 | + * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
4 | + * |
|
5 | + * NOTICE OF LICENSE |
|
6 | + * |
|
7 | + * This source file is subject to the Open Software License (OSL 3.0) |
|
8 | + * that is bundled with this package in the file LICENSE.md. |
|
9 | + * It is also available through the world-wide-web at this URL: |
|
10 | + * http://opensource.org/licenses/osl-3.0.php |
|
11 | + * |
|
12 | + * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
13 | + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
14 | + */ |
|
15 | 15 | |
16 | 16 | namespace eBayEnterprise\RetailOrderManagement\Payload; |
17 | 17 |
@@ -84,7 +84,7 @@ |
||
84 | 84 | |
85 | 85 | public function setIsEncrypted($isEncrypted) |
86 | 86 | { |
87 | - $this->isEncrypted = (bool)$isEncrypted; |
|
87 | + $this->isEncrypted = (bool) $isEncrypted; |
|
88 | 88 | return $this; |
89 | 89 | } |
90 | 90 |
@@ -1,17 +1,17 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
4 | - * |
|
5 | - * NOTICE OF LICENSE |
|
6 | - * |
|
7 | - * This source file is subject to the Open Software License (OSL 3.0) |
|
8 | - * that is bundled with this package in the file LICENSE.md. |
|
9 | - * It is also available through the world-wide-web at this URL: |
|
10 | - * http://opensource.org/licenses/osl-3.0.php |
|
11 | - * |
|
12 | - * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
13 | - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
14 | - */ |
|
3 | + * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
4 | + * |
|
5 | + * NOTICE OF LICENSE |
|
6 | + * |
|
7 | + * This source file is subject to the Open Software License (OSL 3.0) |
|
8 | + * that is bundled with this package in the file LICENSE.md. |
|
9 | + * It is also available through the world-wide-web at this URL: |
|
10 | + * http://opensource.org/licenses/osl-3.0.php |
|
11 | + * |
|
12 | + * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
13 | + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
14 | + */ |
|
15 | 15 | |
16 | 16 | namespace eBayEnterprise\RetailOrderManagement\Payload; |
17 | 17 |
@@ -57,14 +57,14 @@ discard block |
||
57 | 57 | $trimmed = trim($lines); |
58 | 58 | $addressLines = preg_split("/\n/", $trimmed, null, PREG_SPLIT_NO_EMPTY); |
59 | 59 | |
60 | - $newLines = []; |
|
60 | + $newLines = [ ]; |
|
61 | 61 | foreach ($addressLines as $line) { |
62 | - $newLines[] = $this->cleanString($line, 70); |
|
62 | + $newLines[ ] = $this->cleanString($line, 70); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | if (count($newLines) > 4) { |
66 | 66 | // concat lines beyond the four allowed down into the last line |
67 | - $newLines[3] = $this->cleanString(implode(' ', array_slice($newLines, 3)), 70); |
|
67 | + $newLines[ 3 ] = $this->cleanString(implode(' ', array_slice($newLines, 3)), 70); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | $finalLines = array_slice($newLines, 0, 4); |
@@ -80,12 +80,12 @@ discard block |
||
80 | 80 | */ |
81 | 81 | protected function serializeShippingAddress() |
82 | 82 | { |
83 | - $lines = []; |
|
83 | + $lines = [ ]; |
|
84 | 84 | $idx = 0; |
85 | - $shipToLines = is_array($this->shipToLines) ? $this->shipToLines : []; |
|
85 | + $shipToLines = is_array($this->shipToLines) ? $this->shipToLines : [ ]; |
|
86 | 86 | foreach ($shipToLines as $line) { |
87 | 87 | $idx++; |
88 | - $lines[] = sprintf( |
|
88 | + $lines[ ] = sprintf( |
|
89 | 89 | '<Line%d>%s</Line%1$d>', |
90 | 90 | $idx, |
91 | 91 | $this->xmlEncode($line) |
@@ -1,17 +1,17 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
4 | - * |
|
5 | - * NOTICE OF LICENSE |
|
6 | - * |
|
7 | - * This source file is subject to the Open Software License (OSL 3.0) |
|
8 | - * that is bundled with this package in the file LICENSE.md. |
|
9 | - * It is also available through the world-wide-web at this URL: |
|
10 | - * http://opensource.org/licenses/osl-3.0.php |
|
11 | - * |
|
12 | - * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
13 | - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
14 | - */ |
|
3 | + * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
4 | + * |
|
5 | + * NOTICE OF LICENSE |
|
6 | + * |
|
7 | + * This source file is subject to the Open Software License (OSL 3.0) |
|
8 | + * that is bundled with this package in the file LICENSE.md. |
|
9 | + * It is also available through the world-wide-web at this URL: |
|
10 | + * http://opensource.org/licenses/osl-3.0.php |
|
11 | + * |
|
12 | + * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
13 | + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
14 | + */ |
|
15 | 15 | |
16 | 16 | namespace eBayEnterprise\RetailOrderManagement\Payload; |
17 | 17 |
@@ -118,9 +118,9 @@ |
||
118 | 118 | |
119 | 119 | protected function getRootAttributes() |
120 | 120 | { |
121 | - $attrs = ['id' => $this->getId()]; |
|
121 | + $attrs = [ 'id' => $this->getId() ]; |
|
122 | 122 | if ($this->getChargeType()) { |
123 | - $attrs['chargeType'] = $this->getChargeType(); |
|
123 | + $attrs[ 'chargeType' ] = $this->getChargeType(); |
|
124 | 124 | } |
125 | 125 | return $attrs; |
126 | 126 | } |
@@ -20,9 +20,7 @@ |
||
20 | 20 | use eBayEnterprise\RetailOrderManagement\Payload\ISchemaValidator; |
21 | 21 | use eBayEnterprise\RetailOrderManagement\Payload\IValidatorIterator; |
22 | 22 | use eBayEnterprise\RetailOrderManagement\Payload\TPayload; |
23 | - |
|
24 | 23 | use Psr\Log\LoggerInterface; |
25 | -use Psr\Log\NullLogger; |
|
26 | 24 | |
27 | 25 | class OriginPhysicalAddress implements IOriginPhysicalAddress |
28 | 26 | { |
@@ -1,17 +1,17 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
4 | - * |
|
5 | - * NOTICE OF LICENSE |
|
6 | - * |
|
7 | - * This source file is subject to the Open Software License (OSL 3.0) |
|
8 | - * that is bundled with this package in the file LICENSE.md. |
|
9 | - * It is also available through the world-wide-web at this URL: |
|
10 | - * http://opensource.org/licenses/osl-3.0.php |
|
11 | - * |
|
12 | - * @copyright Copyright (c) 2013-2015 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
13 | - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
14 | - */ |
|
3 | + * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
4 | + * |
|
5 | + * NOTICE OF LICENSE |
|
6 | + * |
|
7 | + * This source file is subject to the Open Software License (OSL 3.0) |
|
8 | + * that is bundled with this package in the file LICENSE.md. |
|
9 | + * It is also available through the world-wide-web at this URL: |
|
10 | + * http://opensource.org/licenses/osl-3.0.php |
|
11 | + * |
|
12 | + * @copyright Copyright (c) 2013-2015 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
13 | + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
14 | + */ |
|
15 | 15 | |
16 | 16 | namespace eBayEnterprise\RetailOrderManagement\Payload\Validator\Order; |
17 | 17 |
@@ -1,17 +1,17 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Copyright (c) 2014-2015 eBay Enterprise, Inc. |
|
4 | - * |
|
5 | - * NOTICE OF LICENSE |
|
6 | - * |
|
7 | - * This source file is subject to the Open Software License (OSL 3.0) |
|
8 | - * that is bundled with this package in the file LICENSE.md. |
|
9 | - * It is also available through the world-wide-web at this URL: |
|
10 | - * http://opensource.org/licenses/osl-3.0.php |
|
11 | - * |
|
12 | - * @copyright Copyright (c) 2013-2015 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
13 | - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
14 | - */ |
|
3 | + * Copyright (c) 2014-2015 eBay Enterprise, Inc. |
|
4 | + * |
|
5 | + * NOTICE OF LICENSE |
|
6 | + * |
|
7 | + * This source file is subject to the Open Software License (OSL 3.0) |
|
8 | + * that is bundled with this package in the file LICENSE.md. |
|
9 | + * It is also available through the world-wide-web at this URL: |
|
10 | + * http://opensource.org/licenses/osl-3.0.php |
|
11 | + * |
|
12 | + * @copyright Copyright (c) 2013-2015 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
13 | + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
14 | + */ |
|
15 | 15 | |
16 | 16 | namespace eBayEnterprise\RetailOrderManagement\Payload\TaxDutyFee; |
17 | 17 |