@@ -73,7 +73,7 @@ |
||
73 | 73 | */ |
74 | 74 | public function close($params = null, $opts = null) |
75 | 75 | { |
76 | - $url = $this->instanceUrl() . '/close'; |
|
76 | + $url = $this->instanceUrl().'/close'; |
|
77 | 77 | list($response, $opts) = $this->_request('post', $url, $params, $opts); |
78 | 78 | $this->refreshFrom($response, $opts); |
79 | 79 |
@@ -87,10 +87,10 @@ discard block |
||
87 | 87 | */ |
88 | 88 | public static function retrieve($_id, $_opts = null) |
89 | 89 | { |
90 | - $msg = 'Bank accounts cannot be retrieved without a customer ID or ' . |
|
91 | - 'an account ID. Retrieve a bank account using ' . |
|
92 | - "`Customer::retrieveSource('customer_id', " . |
|
93 | - "'bank_account_id')` or `Account::retrieveExternalAccount(" . |
|
90 | + $msg = 'Bank accounts cannot be retrieved without a customer ID or '. |
|
91 | + 'an account ID. Retrieve a bank account using '. |
|
92 | + "`Customer::retrieveSource('customer_id', ". |
|
93 | + "'bank_account_id')` or `Account::retrieveExternalAccount(". |
|
94 | 94 | "'account_id', 'bank_account_id')`."; |
95 | 95 | |
96 | 96 | throw new Exception\BadMethodCallException($msg); |
@@ -105,10 +105,10 @@ discard block |
||
105 | 105 | */ |
106 | 106 | public static function update($_id, $_params = null, $_options = null) |
107 | 107 | { |
108 | - $msg = 'Bank accounts cannot be updated without a customer ID or an ' . |
|
109 | - 'account ID. Update a bank account using ' . |
|
110 | - "`Customer::updateSource('customer_id', 'bank_account_id', " . |
|
111 | - '$updateParams)` or `Account::updateExternalAccount(' . |
|
108 | + $msg = 'Bank accounts cannot be updated without a customer ID or an '. |
|
109 | + 'account ID. Update a bank account using '. |
|
110 | + "`Customer::updateSource('customer_id', 'bank_account_id', ". |
|
111 | + '$updateParams)` or `Account::updateExternalAccount('. |
|
112 | 112 | "'account_id', 'bank_account_id', \$updateParams)`."; |
113 | 113 | |
114 | 114 | throw new Exception\BadMethodCallException($msg); |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | */ |
125 | 125 | public function verify($params = null, $opts = null) |
126 | 126 | { |
127 | - $url = $this->instanceUrl() . '/verify'; |
|
127 | + $url = $this->instanceUrl().'/verify'; |
|
128 | 128 | list($response, $opts) = $this->_request('post', $url, $params, $opts); |
129 | 129 | $this->refreshFrom($response, $opts); |
130 | 130 |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | { |
85 | 85 | $curlVersion = \curl_version(); |
86 | 86 | $this->userAgentInfo = [ |
87 | - 'httplib' => 'curl ' . $curlVersion['version'], |
|
87 | + 'httplib' => 'curl '.$curlVersion['version'], |
|
88 | 88 | 'ssllib' => $curlVersion['ssl_version'], |
89 | 89 | ]; |
90 | 90 | } |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | // add an Idempotency-Key header |
238 | 238 | if (('post' === $method) && (Stripe::$maxNetworkRetries > 0)) { |
239 | 239 | if (!$this->hasHeader($headers, 'Idempotency-Key')) { |
240 | - $headers[] = 'Idempotency-Key: ' . $this->randomGenerator->uuid(); |
|
240 | + $headers[] = 'Idempotency-Key: '.$this->randomGenerator->uuid(); |
|
241 | 241 | } |
242 | 242 | } |
243 | 243 | |
@@ -323,12 +323,12 @@ discard block |
||
323 | 323 | private function useHeadersToDetermineWriteCallback($opts, $determineWriteCallback) |
324 | 324 | { |
325 | 325 | $rheaders = new Util\CaseInsensitiveArray(); |
326 | - $headerCallback = function ($curl, $header_line) use (&$rheaders) { |
|
326 | + $headerCallback = function($curl, $header_line) use (&$rheaders) { |
|
327 | 327 | return self::parseLineIntoHeaderArray($header_line, $rheaders); |
328 | 328 | }; |
329 | 329 | |
330 | 330 | $writeCallback = null; |
331 | - $writeCallbackWrapper = function ($curl, $data) use (&$writeCallback, &$rheaders, &$determineWriteCallback) { |
|
331 | + $writeCallbackWrapper = function($curl, $data) use (&$writeCallback, &$rheaders, &$determineWriteCallback) { |
|
332 | 332 | if (null === $writeCallback) { |
333 | 333 | $writeCallback = \call_user_func_array($determineWriteCallback, [$rheaders]); |
334 | 334 | } |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | $errno = null; |
388 | 388 | $message = null; |
389 | 389 | |
390 | - $determineWriteCallback = function ($rheaders) use ( |
|
390 | + $determineWriteCallback = function($rheaders) use ( |
|
391 | 391 | &$readBodyChunk, |
392 | 392 | &$shouldRetry, |
393 | 393 | &$rbody, |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | if ($rcode < 300) { |
406 | 406 | $rbody = null; |
407 | 407 | |
408 | - return function ($curl, $data) use (&$readBodyChunk) { |
|
408 | + return function($curl, $data) use (&$readBodyChunk) { |
|
409 | 409 | // Don't expose the $curl handle to the user, and don't require them to |
410 | 410 | // return the length of $data. |
411 | 411 | \call_user_func_array($readBodyChunk, [$data]); |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | |
419 | 419 | // Discard the body from an unsuccessful request that should be retried. |
420 | 420 | if ($shouldRetry) { |
421 | - return function ($curl, $data) { |
|
421 | + return function($curl, $data) { |
|
422 | 422 | return \strlen($data); |
423 | 423 | }; |
424 | 424 | } else { |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | // which exception to throw to the user. |
427 | 427 | $rbody = ''; |
428 | 428 | |
429 | - return function ($curl, $data) use (&$rbody) { |
|
429 | + return function($curl, $data) use (&$rbody) { |
|
430 | 430 | $rbody .= $data; |
431 | 431 | |
432 | 432 | return \strlen($data); |
@@ -490,7 +490,7 @@ discard block |
||
490 | 490 | |
491 | 491 | // Create a callback to capture HTTP headers for the response |
492 | 492 | $rheaders = new Util\CaseInsensitiveArray(); |
493 | - $headerCallback = function ($curl, $header_line) use (&$rheaders) { |
|
493 | + $headerCallback = function($curl, $header_line) use (&$rheaders) { |
|
494 | 494 | return CurlClient::parseLineIntoHeaderArray($header_line, $rheaders); |
495 | 495 | }; |
496 | 496 | $opts[\CURLOPT_HEADERFUNCTION] = $headerCallback; |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | */ |
60 | 60 | public function disconnect($params = null, $opts = null) |
61 | 61 | { |
62 | - $url = $this->instanceUrl() . '/disconnect'; |
|
62 | + $url = $this->instanceUrl().'/disconnect'; |
|
63 | 63 | list($response, $opts) = $this->_request('post', $url, $params, $opts); |
64 | 64 | $this->refreshFrom($response, $opts); |
65 | 65 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | public static function allOwners($id, $params = null, $opts = null) |
79 | 79 | { |
80 | - $url = static::resourceUrl($id) . '/owners'; |
|
80 | + $url = static::resourceUrl($id).'/owners'; |
|
81 | 81 | list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); |
82 | 82 | $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts); |
83 | 83 | $obj->setLastResponse($response); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | */ |
96 | 96 | public function refreshAccount($params = null, $opts = null) |
97 | 97 | { |
98 | - $url = $this->instanceUrl() . '/refresh'; |
|
98 | + $url = $this->instanceUrl().'/refresh'; |
|
99 | 99 | list($response, $opts) = $this->_request('post', $url, $params, $opts); |
100 | 100 | $this->refreshFrom($response, $opts); |
101 | 101 |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function expire($params = null, $opts = null) |
118 | 118 | { |
119 | - $url = $this->instanceUrl() . '/expire'; |
|
119 | + $url = $this->instanceUrl().'/expire'; |
|
120 | 120 | list($response, $opts) = $this->_request('post', $url, $params, $opts); |
121 | 121 | $this->refreshFrom($response, $opts); |
122 | 122 | |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | */ |
135 | 135 | public static function allLineItems($id, $params = null, $opts = null) |
136 | 136 | { |
137 | - $url = static::resourceUrl($id) . '/line_items'; |
|
137 | + $url = static::resourceUrl($id).'/line_items'; |
|
138 | 138 | list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); |
139 | 139 | $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts); |
140 | 140 | $obj->setLastResponse($response); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | */ |
133 | 133 | public static function allSourceTransactions($id, $params = null, $opts = null) |
134 | 134 | { |
135 | - $url = static::resourceUrl($id) . '/source_transactions'; |
|
135 | + $url = static::resourceUrl($id).'/source_transactions'; |
|
136 | 136 | list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); |
137 | 137 | $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts); |
138 | 138 | $obj->setLastResponse($response); |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | */ |
151 | 151 | public function verify($params = null, $opts = null) |
152 | 152 | { |
153 | - $url = $this->instanceUrl() . '/verify'; |
|
153 | + $url = $this->instanceUrl().'/verify'; |
|
154 | 154 | list($response, $opts) = $this->_request('post', $url, $params, $opts); |
155 | 155 | $this->refreshFrom($response, $opts); |
156 | 156 |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | */ |
49 | 49 | public function retrieveFeatures($params = null, $opts = null) |
50 | 50 | { |
51 | - $url = $this->instanceUrl() . '/features'; |
|
51 | + $url = $this->instanceUrl().'/features'; |
|
52 | 52 | list($response, $opts) = $this->_request('get', $url, $params, $opts); |
53 | 53 | $obj = \Stripe\Util\Util::convertToStripeObject($response, $opts); |
54 | 54 | $obj->setLastResponse($response); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function updateFeatures($params = null, $opts = null) |
68 | 68 | { |
69 | - $url = $this->instanceUrl() . '/features'; |
|
69 | + $url = $this->instanceUrl().'/features'; |
|
70 | 70 | list($response, $opts) = $this->_request('post', $url, $params, $opts); |
71 | 71 | $this->refreshFrom($response, $opts); |
72 | 72 |
@@ -184,7 +184,7 @@ |
||
184 | 184 | */ |
185 | 185 | public function reject($params = null, $opts = null) |
186 | 186 | { |
187 | - $url = $this->instanceUrl() . '/reject'; |
|
187 | + $url = $this->instanceUrl().'/reject'; |
|
188 | 188 | list($response, $opts) = $this->_request('post', $url, $params, $opts); |
189 | 189 | $this->refreshFrom($response, $opts); |
190 | 190 |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | */ |
78 | 78 | public static function retrieve($_id, $_opts = null) |
79 | 79 | { |
80 | - $msg = 'Customer Balance Transactions cannot be retrieved without a ' . |
|
81 | - 'customer ID. Retrieve a Customer Balance Transaction using ' . |
|
82 | - "`Customer::retrieveBalanceTransaction('customer_id', " . |
|
80 | + $msg = 'Customer Balance Transactions cannot be retrieved without a '. |
|
81 | + 'customer ID. Retrieve a Customer Balance Transaction using '. |
|
82 | + "`Customer::retrieveBalanceTransaction('customer_id', ". |
|
83 | 83 | "'balance_transaction_id')`."; |
84 | 84 | |
85 | 85 | throw new Exception\BadMethodCallException($msg); |
@@ -94,9 +94,9 @@ discard block |
||
94 | 94 | */ |
95 | 95 | public static function update($_id, $_params = null, $_options = null) |
96 | 96 | { |
97 | - $msg = 'Customer Balance Transactions cannot be updated without a ' . |
|
98 | - 'customer ID. Update a Customer Balance Transaction using ' . |
|
99 | - "`Customer::updateBalanceTransaction('customer_id', " . |
|
97 | + $msg = 'Customer Balance Transactions cannot be updated without a '. |
|
98 | + 'customer ID. Update a Customer Balance Transaction using '. |
|
99 | + "`Customer::updateBalanceTransaction('customer_id', ". |
|
100 | 100 | "'balance_transaction_id', \$updateParams)`."; |
101 | 101 | |
102 | 102 | throw new Exception\BadMethodCallException($msg); |