@@ -42,8 +42,8 @@ |
||
42 | 42 | public static function retrieve($_id, $_opts = null) |
43 | 43 | { |
44 | 44 | $msg = 'Customer Cash Balance cannot be retrieved without a ' . |
45 | - 'customer ID. Retrieve a Customer Cash Balance using ' . |
|
46 | - "`Customer::retrieveCashBalance('customer_id')`."; |
|
45 | + 'customer ID. Retrieve a Customer Cash Balance using ' . |
|
46 | + "`Customer::retrieveCashBalance('customer_id')`."; |
|
47 | 47 | |
48 | 48 | throw new Exception\BadMethodCallException($msg); |
49 | 49 | } |
@@ -60,9 +60,9 @@ |
||
60 | 60 | return parent::offsetGet($k); |
61 | 61 | } |
62 | 62 | $msg = "You tried to access the {$k} index, but Collection " . |
63 | - 'types only support string keys. (HINT: List calls ' . |
|
64 | - 'return an object with a `data` (which is the data ' . |
|
65 | - "array). You likely want to call ->data[{$k}])"; |
|
63 | + 'types only support string keys. (HINT: List calls ' . |
|
64 | + 'return an object with a `data` (which is the data ' . |
|
65 | + "array). You likely want to call ->data[{$k}])"; |
|
66 | 66 | |
67 | 67 | throw new Exception\InvalidArgumentException($msg); |
68 | 68 | } |
@@ -100,8 +100,8 @@ discard block |
||
100 | 100 | public static function retrieve($_id, $_opts = null) |
101 | 101 | { |
102 | 102 | $msg = 'Persons cannot be retrieved without an account ID. Retrieve ' . |
103 | - "a person using `Account::retrievePerson('account_id', " . |
|
104 | - "'person_id')`."; |
|
103 | + "a person using `Account::retrievePerson('account_id', " . |
|
104 | + "'person_id')`."; |
|
105 | 105 | |
106 | 106 | throw new Exception\BadMethodCallException($msg); |
107 | 107 | } |
@@ -116,8 +116,8 @@ discard block |
||
116 | 116 | public static function update($_id, $_params = null, $_options = null) |
117 | 117 | { |
118 | 118 | $msg = 'Persons cannot be updated without an account ID. Update ' . |
119 | - "a person using `Account::updatePerson('account_id', " . |
|
120 | - "'person_id', \$updateParams)`."; |
|
119 | + "a person using `Account::updatePerson('account_id', " . |
|
120 | + "'person_id', \$updateParams)`."; |
|
121 | 121 | |
122 | 122 | throw new Exception\BadMethodCallException($msg); |
123 | 123 | } |
@@ -103,7 +103,7 @@ |
||
103 | 103 | if (null === $id) { |
104 | 104 | $class = static::class; |
105 | 105 | $message = 'Could not determine which URL to request: ' |
106 | - . "{$class} instance has invalid ID: {$id}"; |
|
106 | + . "{$class} instance has invalid ID: {$id}"; |
|
107 | 107 | |
108 | 108 | throw new Exception\UnexpectedValueException($message); |
109 | 109 | } |
@@ -147,9 +147,9 @@ |
||
147 | 147 | } |
148 | 148 | |
149 | 149 | $message = 'The second argument to Stripe API method calls is an ' |
150 | - . 'optional per-request apiKey, which must be a string, or ' |
|
151 | - . 'per-request options, which must be an array. (HINT: you can set ' |
|
152 | - . 'a global apiKey by "Stripe::setApiKey(<apiKey>)")'; |
|
150 | + . 'optional per-request apiKey, which must be a string, or ' |
|
151 | + . 'per-request options, which must be an array. (HINT: you can set ' |
|
152 | + . 'a global apiKey by "Stripe::setApiKey(<apiKey>)")'; |
|
153 | 153 | |
154 | 154 | throw new \Stripe\Exception\InvalidArgumentException($message); |
155 | 155 | } |
@@ -18,9 +18,9 @@ |
||
18 | 18 | { |
19 | 19 | if ($params && !\is_array($params)) { |
20 | 20 | $message = 'You must pass an array as the first argument to Stripe API ' |
21 | - . 'method calls. (HINT: an example call to create a charge ' |
|
22 | - . "would be: \"Stripe\\Charge::create(['amount' => 100, " |
|
23 | - . "'currency' => 'usd', 'source' => 'tok_1234'])\")"; |
|
21 | + . 'method calls. (HINT: an example call to create a charge ' |
|
22 | + . "would be: \"Stripe\\Charge::create(['amount' => 100, " |
|
23 | + . "'currency' => 'usd', 'source' => 'tok_1234'])\")"; |
|
24 | 24 | |
25 | 25 | throw new \Stripe\Exception\InvalidArgumentException($message); |
26 | 26 | } |
@@ -84,7 +84,7 @@ |
||
84 | 84 | |
85 | 85 | use ApiOperations\Delete { |
86 | 86 | delete as protected _delete; |
87 | - } |
|
87 | + } |
|
88 | 88 | |
89 | 89 | public static function getSavedNestedResources() |
90 | 90 | { |
@@ -549,24 +549,24 @@ |
||
549 | 549 | case \CURLE_COULDNT_RESOLVE_HOST: |
550 | 550 | case \CURLE_OPERATION_TIMEOUTED: |
551 | 551 | $msg = "Could not connect to Stripe ({$url}). Please check your " |
552 | - . 'internet connection and try again. If this problem persists, ' |
|
553 | - . "you should check Stripe's service status at " |
|
554 | - . 'https://twitter.com/stripestatus, or'; |
|
552 | + . 'internet connection and try again. If this problem persists, ' |
|
553 | + . "you should check Stripe's service status at " |
|
554 | + . 'https://twitter.com/stripestatus, or'; |
|
555 | 555 | |
556 | 556 | break; |
557 | 557 | |
558 | 558 | case \CURLE_SSL_CACERT: |
559 | 559 | case \CURLE_SSL_PEER_CERTIFICATE: |
560 | 560 | $msg = "Could not verify Stripe's SSL certificate. Please make sure " |
561 | - . 'that your network is not intercepting certificates. ' |
|
562 | - . "(Try going to {$url} in your browser.) " |
|
563 | - . 'If this problem persists,'; |
|
561 | + . 'that your network is not intercepting certificates. ' |
|
562 | + . "(Try going to {$url} in your browser.) " |
|
563 | + . 'If this problem persists,'; |
|
564 | 564 | |
565 | 565 | break; |
566 | 566 | |
567 | 567 | default: |
568 | 568 | $msg = 'Unexpected error communicating with Stripe. ' |
569 | - . 'If this problem persists,'; |
|
569 | + . 'If this problem persists,'; |
|
570 | 570 | } |
571 | 571 | $msg .= ' let us know at [email protected].'; |
572 | 572 |
@@ -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; |
@@ -86,12 +86,12 @@ |
||
86 | 86 | } |
87 | 87 | if (null === $clientId) { |
88 | 88 | $msg = 'No client_id provided. (HINT: set your client_id using ' |
89 | - . '"Stripe::setClientId(<CLIENT-ID>)". You can find your client_ids ' |
|
90 | - . 'in your Stripe dashboard at ' |
|
91 | - . 'https://dashboard.stripe.com/account/applications/settings, ' |
|
92 | - . 'after registering your account as a platform. See ' |
|
93 | - . 'https://stripe.com/docs/connect/standard-accounts for details, ' |
|
94 | - . 'or email [email protected] if you have any questions.'; |
|
89 | + . '"Stripe::setClientId(<CLIENT-ID>)". You can find your client_ids ' |
|
90 | + . 'in your Stripe dashboard at ' |
|
91 | + . 'https://dashboard.stripe.com/account/applications/settings, ' |
|
92 | + . 'after registering your account as a platform. See ' |
|
93 | + . 'https://stripe.com/docs/connect/standard-accounts for details, ' |
|
94 | + . 'or email [email protected] if you have any questions.'; |
|
95 | 95 | |
96 | 96 | throw new Exception\AuthenticationException($msg); |
97 | 97 | } |