@@ -70,7 +70,7 @@ |
||
70 | 70 | $connectionUsername, |
71 | 71 | $connectionPassword, |
72 | 72 | $connectionVhost, |
73 | - array $connectionContext = [], |
|
73 | + array $connectionContext = [ ], |
|
74 | 74 | $connectionInsist = null, |
75 | 75 | $connectionLoginMethod = null, |
76 | 76 | $connectionLocale = null, |
@@ -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 | * - 'channel' => AMQPChannel |
58 | 58 | * @param LoggerInterface $logger |
59 | 59 | */ |
60 | - public function __construct(IAmqpConfig $config, array $args = [], LoggerInterface $logger = null) |
|
60 | + public function __construct(IAmqpConfig $config, array $args = [ ], LoggerInterface $logger = null) |
|
61 | 61 | { |
62 | 62 | $this->logger = $logger ?: new NullLogger(); |
63 | 63 | $this->config = $config; |
64 | 64 | // injectable primarily for testing purposes |
65 | 65 | list($this->connection, $this->channel) = $this->checkTypes( |
66 | - isset($args['connection']) ? $args['connection'] : null, |
|
67 | - isset($args['channel']) ? $args['channel'] : null |
|
66 | + isset($args[ 'connection' ]) ? $args[ 'connection' ] : null, |
|
67 | + isset($args[ 'channel' ]) ? $args[ 'channel' ] : null |
|
68 | 68 | ); |
69 | 69 | $this->messageFactory = new Payload\OmnidirectionalMessageFactory(); |
70 | 70 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | */ |
80 | 80 | protected function checkTypes(AbstractConnection $connection = null, AMQPChannel $channel = null) |
81 | 81 | { |
82 | - return [$connection, $channel]; |
|
82 | + return [ $connection, $channel ]; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | protected function declareQueue() |
132 | 132 | { |
133 | 133 | call_user_func_array( |
134 | - [$this->channel, 'queue_declare'], |
|
134 | + [ $this->channel, 'queue_declare' ], |
|
135 | 135 | $this->config->getQueueConfiguration() |
136 | 136 | ); |
137 | 137 | return $this; |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | // ack every message received from the queue. |
196 | 196 | if ($message) { |
197 | 197 | // direct delivery_info array access recommended in PhpAmqpLib documentation |
198 | - $this->channel->basic_ack($message->delivery_info['delivery_tag']); |
|
198 | + $this->channel->basic_ack($message->delivery_info[ 'delivery_tag' ]); |
|
199 | 199 | } |
200 | 200 | return $message; |
201 | 201 | } |
@@ -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 |
@@ -185,7 +185,7 @@ |
||
185 | 185 | $vhost = urlencode($connectionVhost); |
186 | 186 | $this->endpoint = "amqp://{$connectionUsername}@{$connectionHostname}:{$connectionPort}/{$vhost}"; |
187 | 187 | |
188 | - $this->connectionConfig = new $this->connectionConfigTypes[$this->connectionType]( |
|
188 | + $this->connectionConfig = new $this->connectionConfigTypes[ $this->connectionType ]( |
|
189 | 189 | $connectionHostname, |
190 | 190 | $connectionPort, |
191 | 191 | $connectionUsername, |
@@ -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,7 +57,7 @@ |
||
57 | 57 | $storeId, |
58 | 58 | $service, |
59 | 59 | $operation, |
60 | - array $endpointParams = [], |
|
60 | + array $endpointParams = [ ], |
|
61 | 61 | LoggerInterface $logger = null |
62 | 62 | ) { |
63 | 63 | $this->logger = $logger ?: new NullLogger(); |
@@ -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 | /** @var int */ |
35 | 35 | protected $resultSuggestionCount; |
36 | 36 | /** @var string[] */ |
37 | - protected $validResultCodes = [self::RESULT_VALID]; |
|
37 | + protected $validResultCodes = [ self::RESULT_VALID ]; |
|
38 | 38 | /** @var string[] */ |
39 | 39 | protected $acceptResultCodes = [ |
40 | 40 | self::RESULT_VALID, |
@@ -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 |
@@ -37,9 +37,9 @@ discard block |
||
37 | 37 | /** @var int */ |
38 | 38 | protected $currentKey = 0; |
39 | 39 | /** @var AMQPMessage[] */ |
40 | - protected $messages = []; |
|
40 | + protected $messages = [ ]; |
|
41 | 41 | /** @var IPayload[] */ |
42 | - protected $payloads = []; |
|
42 | + protected $payloads = [ ]; |
|
43 | 43 | /** @var LoggerInterface */ |
44 | 44 | protected $logger; |
45 | 45 | |
@@ -70,10 +70,10 @@ discard block |
||
70 | 70 | if (!$this->valid()) { |
71 | 71 | return null; |
72 | 72 | } |
73 | - if (!isset($this->payloads[$this->currentKey])) { |
|
74 | - $this->payloads[$this->currentKey] = $this->processMessage($this->messages[$this->currentKey]); |
|
73 | + if (!isset($this->payloads[ $this->currentKey ])) { |
|
74 | + $this->payloads[ $this->currentKey ] = $this->processMessage($this->messages[ $this->currentKey ]); |
|
75 | 75 | } |
76 | - return $this->payloads[$this->currentKey]; |
|
76 | + return $this->payloads[ $this->currentKey ]; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | /** |
@@ -88,13 +88,13 @@ discard block |
||
88 | 88 | return false; |
89 | 89 | } |
90 | 90 | // if a payload already exists for the current key, we'll be able to return that |
91 | - if (isset($this->messages[$this->currentKey])) { |
|
91 | + if (isset($this->messages[ $this->currentKey ])) { |
|
92 | 92 | return true; |
93 | 93 | } |
94 | 94 | // if no payload exists for the current key yet, try to get the next one |
95 | 95 | $message = $this->api->getNextMessage(); |
96 | 96 | if ($message) { |
97 | - $this->messages[$this->currentKey] = $message; |
|
97 | + $this->messages[ $this->currentKey ] = $message; |
|
98 | 98 | return true; |
99 | 99 | } |
100 | 100 | // if no message exists and no new messages could be received, |
@@ -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 |
@@ -17,85 +17,85 @@ |
||
17 | 17 | * Wrap include in a function to allow variables while protecting scope. |
18 | 18 | * @return array mapping of config keys to message payload types for bidirectional api operations |
19 | 19 | */ |
20 | -return call_user_func(function () { |
|
21 | - $map = []; |
|
22 | - $map['address/validate'] = [ |
|
20 | +return call_user_func(function() { |
|
21 | + $map = [ ]; |
|
22 | + $map[ 'address/validate' ] = [ |
|
23 | 23 | 'request' => '\eBayEnterprise\RetailOrderManagement\Payload\Address\ValidationRequest', |
24 | 24 | 'reply' => '\eBayEnterprise\RetailOrderManagement\Payload\Address\ValidationReply', |
25 | 25 | ]; |
26 | - $map['orders/create'] = [ |
|
26 | + $map[ 'orders/create' ] = [ |
|
27 | 27 | 'request' => '\eBayEnterprise\RetailOrderManagement\Payload\Order\OrderCreateRequest', |
28 | 28 | 'reply' => '\eBayEnterprise\RetailOrderManagement\Payload\Order\OrderCreateReply', |
29 | 29 | ]; |
30 | - $map['payments/creditcard/auth'] = [ |
|
30 | + $map[ 'payments/creditcard/auth' ] = [ |
|
31 | 31 | 'request' => '\eBayEnterprise\RetailOrderManagement\Payload\Payment\CreditCardAuthRequest', |
32 | 32 | 'reply' => '\eBayEnterprise\RetailOrderManagement\Payload\Payment\CreditCardAuthReply', |
33 | 33 | ]; |
34 | - $map['payments/storedvalue/balance'] = [ |
|
34 | + $map[ 'payments/storedvalue/balance' ] = [ |
|
35 | 35 | 'request' => '\eBayEnterprise\RetailOrderManagement\Payload\Payment\StoredValueBalanceRequest', |
36 | 36 | 'reply' => '\eBayEnterprise\RetailOrderManagement\Payload\Payment\StoredValueBalanceReply', |
37 | 37 | ]; |
38 | - $map['payments/storedvalue/redeem'] = [ |
|
38 | + $map[ 'payments/storedvalue/redeem' ] = [ |
|
39 | 39 | 'request' => '\eBayEnterprise\RetailOrderManagement\Payload\Payment\StoredValueRedeemRequest', |
40 | 40 | 'reply' => '\eBayEnterprise\RetailOrderManagement\Payload\Payment\StoredValueRedeemReply', |
41 | 41 | ]; |
42 | - $map['payments/storedvalue/redeemvoid'] = [ |
|
42 | + $map[ 'payments/storedvalue/redeemvoid' ] = [ |
|
43 | 43 | 'request' => '\eBayEnterprise\RetailOrderManagement\Payload\Payment\StoredValueRedeemVoidRequest', |
44 | 44 | 'reply' => '\eBayEnterprise\RetailOrderManagement\Payload\Payment\StoredValueRedeemVoidReply', |
45 | 45 | ]; |
46 | - $map['payments/paypal/setExpress'] = [ |
|
46 | + $map[ 'payments/paypal/setExpress' ] = [ |
|
47 | 47 | 'request' => '\eBayEnterprise\RetailOrderManagement\Payload\Payment\PayPalSetExpressCheckoutRequest', |
48 | 48 | 'reply' => '\eBayEnterprise\RetailOrderManagement\Payload\Payment\PayPalSetExpressCheckoutReply', |
49 | 49 | ]; |
50 | - $map['payments/paypal/getExpress'] = [ |
|
50 | + $map[ 'payments/paypal/getExpress' ] = [ |
|
51 | 51 | 'request' => '\eBayEnterprise\RetailOrderManagement\Payload\Payment\PayPalGetExpressCheckoutRequest', |
52 | 52 | 'reply' => '\eBayEnterprise\RetailOrderManagement\Payload\Payment\PayPalGetExpressCheckoutReply', |
53 | 53 | ]; |
54 | - $map['payments/paypal/doExpress'] = [ |
|
54 | + $map[ 'payments/paypal/doExpress' ] = [ |
|
55 | 55 | 'request' => '\eBayEnterprise\RetailOrderManagement\Payload\Payment\PayPalDoExpressCheckoutRequest', |
56 | 56 | 'reply' => '\eBayEnterprise\RetailOrderManagement\Payload\Payment\PayPalDoExpressCheckoutReply', |
57 | 57 | ]; |
58 | - $map['payments/paypal/doAuth'] = [ |
|
58 | + $map[ 'payments/paypal/doAuth' ] = [ |
|
59 | 59 | 'request' => '\eBayEnterprise\RetailOrderManagement\Payload\Payment\PayPalDoAuthorizationRequest', |
60 | 60 | 'reply' => '\eBayEnterprise\RetailOrderManagement\Payload\Payment\PayPalDoAuthorizationReply', |
61 | 61 | ]; |
62 | - $map['payments/paypal/void'] = [ |
|
62 | + $map[ 'payments/paypal/void' ] = [ |
|
63 | 63 | 'request' => '\eBayEnterprise\RetailOrderManagement\Payload\Payment\PayPalDoVoidRequest', |
64 | 64 | 'reply' => '\eBayEnterprise\RetailOrderManagement\Payload\Payment\PayPalDoVoidReply', |
65 | 65 | ]; |
66 | - $map['taxes/quote'] = [ |
|
66 | + $map[ 'taxes/quote' ] = [ |
|
67 | 67 | 'request' => '\eBayEnterprise\RetailOrderManagement\Payload\TaxDutyFee\TaxDutyFeeQuoteRequest', |
68 | 68 | 'reply' => '\eBayEnterprise\RetailOrderManagement\Payload\TaxDutyFee\TaxDutyFeeQuoteReply', |
69 | 69 | ]; |
70 | - $map['orders/cancel'] = [ |
|
70 | + $map[ 'orders/cancel' ] = [ |
|
71 | 71 | 'request' => '\eBayEnterprise\RetailOrderManagement\Payload\Order\OrderCancelRequest', |
72 | 72 | 'reply' => '\eBayEnterprise\RetailOrderManagement\Payload\Order\OrderCancelResponse', |
73 | 73 | ]; |
74 | - $map['customers/orders/get'] = [ |
|
74 | + $map[ 'customers/orders/get' ] = [ |
|
75 | 75 | 'request' => '\eBayEnterprise\RetailOrderManagement\Payload\Customer\OrderSummaryRequest', |
76 | 76 | 'reply' => '\eBayEnterprise\RetailOrderManagement\Payload\Customer\OrderSummaryResponse', |
77 | 77 | ]; |
78 | - $map['inventory/quantity/get'] = [ |
|
78 | + $map[ 'inventory/quantity/get' ] = [ |
|
79 | 79 | 'request' => '\eBayEnterprise\RetailOrderManagement\Payload\Inventory\QuantityRequest', |
80 | 80 | 'reply' => '\eBayEnterprise\RetailOrderManagement\Payload\Inventory\QuantityReply', |
81 | 81 | ]; |
82 | - $map['inventory/details/get'] = [ |
|
82 | + $map[ 'inventory/details/get' ] = [ |
|
83 | 83 | 'request' => '\eBayEnterprise\RetailOrderManagement\Payload\Inventory\InventoryDetailsRequest', |
84 | 84 | 'reply' => '\eBayEnterprise\RetailOrderManagement\Payload\Inventory\InventoryDetailsReply', |
85 | 85 | ]; |
86 | - $map['orders/get'] = [ |
|
86 | + $map[ 'orders/get' ] = [ |
|
87 | 87 | 'request' => '\eBayEnterprise\RetailOrderManagement\Payload\Order\Detail\OrderDetailRequest', |
88 | 88 | 'reply' => '\eBayEnterprise\RetailOrderManagement\Payload\Order\Detail\OrderDetailResponse', |
89 | 89 | ]; |
90 | - $map['inventory/allocations/create'] = [ |
|
90 | + $map[ 'inventory/allocations/create' ] = [ |
|
91 | 91 | 'request' => '\eBayEnterprise\RetailOrderManagement\Payload\Inventory\AllocationRequest', |
92 | 92 | 'reply' => '\eBayEnterprise\RetailOrderManagement\Payload\Inventory\AllocationReply', |
93 | 93 | ]; |
94 | - $map['inventory/allocations/delete'] = [ |
|
94 | + $map[ 'inventory/allocations/delete' ] = [ |
|
95 | 95 | 'request' => '\eBayEnterprise\RetailOrderManagement\Payload\Inventory\AllocationRollbackRequest', |
96 | 96 | 'reply' => '\eBayEnterprise\RetailOrderManagement\Payload\Inventory\AllocationRollbackReply', |
97 | 97 | ]; |
98 | - $map['payments/tendertype/lookup'] = [ |
|
98 | + $map[ 'payments/tendertype/lookup' ] = [ |
|
99 | 99 | 'request' => '\eBayEnterprise\RetailOrderManagement\Payload\Payment\TenderType\LookupRequest', |
100 | 100 | 'reply' => '\eBayEnterprise\RetailOrderManagement\Payload\Payment\TenderType\LookupReply', |
101 | 101 | ]; |
@@ -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 |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | /** @var LoggerInterface */ |
32 | 32 | protected $logger; |
33 | 33 | |
34 | - public function __construct(IConfig $config, IPayloadFactory $payloadFactory = null, array $messageMapping = [], LoggerInterface $logger = null) |
|
34 | + public function __construct(IConfig $config, IPayloadFactory $payloadFactory = null, array $messageMapping = [ ], LoggerInterface $logger = null) |
|
35 | 35 | { |
36 | 36 | $this->logger = $logger ?: new NullLogger(); |
37 | 37 | $this->config = $config; |
@@ -54,8 +54,8 @@ discard block |
||
54 | 54 | public function messagePayload($type) |
55 | 55 | { |
56 | 56 | $key = $this->config->getConfigKey(); |
57 | - if (isset($this->messageTypeMap[$key])) { |
|
58 | - return $this->payloadFactory->buildPayload($this->messageTypeMap[$key][$type], null, null, $this->logger); |
|
57 | + if (isset($this->messageTypeMap[ $key ])) { |
|
58 | + return $this->payloadFactory->buildPayload($this->messageTypeMap[ $key ][ $type ], null, null, $this->logger); |
|
59 | 59 | } |
60 | 60 | throw new UnsupportedPayload("No payload found for '$key'"); |
61 | 61 | } |
@@ -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 |
@@ -91,12 +91,12 @@ discard block |
||
91 | 91 | */ |
92 | 92 | protected function serializePhysicalAddress() |
93 | 93 | { |
94 | - $lines = []; |
|
94 | + $lines = [ ]; |
|
95 | 95 | $idx = 0; |
96 | - $addressLines = is_array($this->lines) ? $this->lines : []; |
|
96 | + $addressLines = is_array($this->lines) ? $this->lines : [ ]; |
|
97 | 97 | foreach ($addressLines as $line) { |
98 | 98 | $idx++; |
99 | - $lines[] = sprintf( |
|
99 | + $lines[ ] = sprintf( |
|
100 | 100 | '<Line%d>%s</Line%1$d>', |
101 | 101 | $idx, |
102 | 102 | $this->xmlEncode($line) |
@@ -143,14 +143,14 @@ discard block |
||
143 | 143 | $trimmed = trim($lines); |
144 | 144 | $addressLines = preg_split("/\n/", $trimmed, null, PREG_SPLIT_NO_EMPTY); |
145 | 145 | |
146 | - $newLines = []; |
|
146 | + $newLines = [ ]; |
|
147 | 147 | foreach ($addressLines as $line) { |
148 | - $newLines[] = $this->cleanString($line, 70); |
|
148 | + $newLines[ ] = $this->cleanString($line, 70); |
|
149 | 149 | } |
150 | 150 | |
151 | 151 | if (count($newLines) > 4) { |
152 | 152 | // concat lines beyond the four allowed down into the last line |
153 | - $newLines[3] = $this->cleanString(implode(' ', array_slice($newLines, 3)), 70); |
|
153 | + $newLines[ 3 ] = $this->cleanString(implode(' ', array_slice($newLines, 3)), 70); |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | $finalLines = array_slice($newLines, 0, 4); |
@@ -110,6 +110,7 @@ |
||
110 | 110 | * |
111 | 111 | * @param string |
112 | 112 | * @param string |
113 | + * @param string $name |
|
113 | 114 | * @return string |
114 | 115 | */ |
115 | 116 | abstract protected function serializeOptionalXmlEncodedValue($name, $value); |
@@ -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 |