@@ -45,7 +45,7 @@ |
||
45 | 45 | */ |
46 | 46 | public function submit($params = null, $opts = null) |
47 | 47 | { |
48 | - $url = $this->instanceUrl() . '/submit'; |
|
48 | + $url = $this->instanceUrl().'/submit'; |
|
49 | 49 | list($response, $opts) = $this->_request('post', $url, $params, $opts); |
50 | 50 | $this->refreshFrom($response, $opts); |
51 | 51 |
@@ -71,9 +71,9 @@ discard block |
||
71 | 71 | if (\is_string($k)) { |
72 | 72 | return parent::offsetGet($k); |
73 | 73 | } |
74 | - $msg = "You tried to access the {$k} index, but SearchResult " . |
|
75 | - 'types only support string keys. (HINT: Search calls ' . |
|
76 | - 'return an object with a `data` (which is the data ' . |
|
74 | + $msg = "You tried to access the {$k} index, but SearchResult ". |
|
75 | + 'types only support string keys. (HINT: Search calls '. |
|
76 | + 'return an object with a `data` (which is the data '. |
|
77 | 77 | "array). You likely want to call ->data[{$k}])"; |
78 | 78 | |
79 | 79 | throw new Exception\InvalidArgumentException($msg); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $obj = Util\Util::convertToStripeObject($response, $opts); |
97 | 97 | if (!($obj instanceof \Stripe\SearchResult)) { |
98 | 98 | throw new \Stripe\Exception\UnexpectedValueException( |
99 | - 'Expected type ' . \Stripe\SearchResult::class . ', got "' . \get_class($obj) . '" instead.' |
|
99 | + 'Expected type '.\Stripe\SearchResult::class.', got "'.\get_class($obj).'" instead.' |
|
100 | 100 | ); |
101 | 101 | } |
102 | 102 | $obj->setFilters($params); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | public function cancel($params = null, $opts = null) |
92 | 92 | { |
93 | - $url = $this->instanceUrl() . '/cancel'; |
|
93 | + $url = $this->instanceUrl().'/cancel'; |
|
94 | 94 | list($response, $opts) = $this->_request('post', $url, $params, $opts); |
95 | 95 | $this->refreshFrom($response, $opts); |
96 | 96 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | */ |
108 | 108 | public function confirm($params = null, $opts = null) |
109 | 109 | { |
110 | - $url = $this->instanceUrl() . '/confirm'; |
|
110 | + $url = $this->instanceUrl().'/confirm'; |
|
111 | 111 | list($response, $opts) = $this->_request('post', $url, $params, $opts); |
112 | 112 | $this->refreshFrom($response, $opts); |
113 | 113 | |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | */ |
125 | 125 | public function verifyMicrodeposits($params = null, $opts = null) |
126 | 126 | { |
127 | - $url = $this->instanceUrl() . '/verify_microdeposits'; |
|
127 | + $url = $this->instanceUrl().'/verify_microdeposits'; |
|
128 | 128 | list($response, $opts) = $this->_request('post', $url, $params, $opts); |
129 | 129 | $this->refreshFrom($response, $opts); |
130 | 130 |
@@ -131,16 +131,16 @@ discard block |
||
131 | 131 | { |
132 | 132 | if (static::getPermanentAttributes()->includes($k)) { |
133 | 133 | throw new Exception\InvalidArgumentException( |
134 | - "Cannot set {$k} on this object. HINT: you can't set: " . |
|
134 | + "Cannot set {$k} on this object. HINT: you can't set: ". |
|
135 | 135 | \implode(', ', static::getPermanentAttributes()->toArray()) |
136 | 136 | ); |
137 | 137 | } |
138 | 138 | |
139 | 139 | if ('' === $v) { |
140 | 140 | throw new Exception\InvalidArgumentException( |
141 | - 'You cannot set \'' . $k . '\'to an empty string. ' |
|
141 | + 'You cannot set \''.$k.'\'to an empty string. ' |
|
142 | 142 | . 'We interpret empty strings as NULL in requests. ' |
143 | - . 'You may set obj->' . $k . ' = NULL to delete the property' |
|
143 | + . 'You may set obj->'.$k.' = NULL to delete the property' |
|
144 | 144 | ); |
145 | 145 | } |
146 | 146 | |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | // value that we shouldn't appear in the serialized form of the object |
375 | 375 | return \array_filter( |
376 | 376 | $updateParams, |
377 | - function ($v) { |
|
377 | + function($v) { |
|
378 | 378 | return null !== $v; |
379 | 379 | } |
380 | 380 | ); |
@@ -416,8 +416,8 @@ discard block |
||
416 | 416 | } |
417 | 417 | |
418 | 418 | throw new Exception\InvalidArgumentException( |
419 | - "Cannot save property `{$key}` containing an API resource of type " . |
|
420 | - \get_class($value) . ". It doesn't appear to be persisted and is " . |
|
419 | + "Cannot save property `{$key}` containing an API resource of type ". |
|
420 | + \get_class($value).". It doesn't appear to be persisted and is ". |
|
421 | 421 | 'not marked as `saveWithParent`.' |
422 | 422 | ); |
423 | 423 | } |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | */ |
466 | 466 | public function toArray() |
467 | 467 | { |
468 | - $maybeToArray = function ($value) { |
|
468 | + $maybeToArray = function($value) { |
|
469 | 469 | if (null === $value) { |
470 | 470 | return null; |
471 | 471 | } |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | return \is_object($value) && \method_exists($value, 'toArray') ? $value->toArray() : $value; |
474 | 474 | }; |
475 | 475 | |
476 | - return \array_reduce(\array_keys($this->_values), function ($acc, $k) use ($maybeToArray) { |
|
476 | + return \array_reduce(\array_keys($this->_values), function($acc, $k) use ($maybeToArray) { |
|
477 | 477 | if ('_' === \substr((string) $k, 0, 1)) { |
478 | 478 | return $acc; |
479 | 479 | } |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | { |
503 | 503 | $class = static::class; |
504 | 504 | |
505 | - return $class . ' JSON: ' . $this->toJSON(); |
|
505 | + return $class.' JSON: '.$this->toJSON(); |
|
506 | 506 | } |
507 | 507 | |
508 | 508 | /** |
@@ -570,7 +570,7 @@ discard block |
||
570 | 570 | $values = $obj->_values; |
571 | 571 | } else { |
572 | 572 | throw new Exception\InvalidArgumentException( |
573 | - 'empty_values got unexpected object type: ' . \get_class($obj) |
|
573 | + 'empty_values got unexpected object type: '.\get_class($obj) |
|
574 | 574 | ); |
575 | 575 | } |
576 | 576 |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | public function applyCustomerBalance($params = null, $opts = null) |
88 | 88 | { |
89 | - $url = $this->instanceUrl() . '/apply_customer_balance'; |
|
89 | + $url = $this->instanceUrl().'/apply_customer_balance'; |
|
90 | 90 | list($response, $opts) = $this->_request('post', $url, $params, $opts); |
91 | 91 | $this->refreshFrom($response, $opts); |
92 | 92 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | */ |
104 | 104 | public function cancel($params = null, $opts = null) |
105 | 105 | { |
106 | - $url = $this->instanceUrl() . '/cancel'; |
|
106 | + $url = $this->instanceUrl().'/cancel'; |
|
107 | 107 | list($response, $opts) = $this->_request('post', $url, $params, $opts); |
108 | 108 | $this->refreshFrom($response, $opts); |
109 | 109 | |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | */ |
121 | 121 | public function capture($params = null, $opts = null) |
122 | 122 | { |
123 | - $url = $this->instanceUrl() . '/capture'; |
|
123 | + $url = $this->instanceUrl().'/capture'; |
|
124 | 124 | list($response, $opts) = $this->_request('post', $url, $params, $opts); |
125 | 125 | $this->refreshFrom($response, $opts); |
126 | 126 | |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | */ |
138 | 138 | public function confirm($params = null, $opts = null) |
139 | 139 | { |
140 | - $url = $this->instanceUrl() . '/confirm'; |
|
140 | + $url = $this->instanceUrl().'/confirm'; |
|
141 | 141 | list($response, $opts) = $this->_request('post', $url, $params, $opts); |
142 | 142 | $this->refreshFrom($response, $opts); |
143 | 143 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | */ |
155 | 155 | public function incrementAuthorization($params = null, $opts = null) |
156 | 156 | { |
157 | - $url = $this->instanceUrl() . '/increment_authorization'; |
|
157 | + $url = $this->instanceUrl().'/increment_authorization'; |
|
158 | 158 | list($response, $opts) = $this->_request('post', $url, $params, $opts); |
159 | 159 | $this->refreshFrom($response, $opts); |
160 | 160 | |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | */ |
172 | 172 | public function verifyMicrodeposits($params = null, $opts = null) |
173 | 173 | { |
174 | - $url = $this->instanceUrl() . '/verify_microdeposits'; |
|
174 | + $url = $this->instanceUrl().'/verify_microdeposits'; |
|
175 | 175 | list($response, $opts) = $this->_request('post', $url, $params, $opts); |
176 | 176 | $this->refreshFrom($response, $opts); |
177 | 177 |
@@ -59,9 +59,9 @@ discard block |
||
59 | 59 | if (\is_string($k)) { |
60 | 60 | return parent::offsetGet($k); |
61 | 61 | } |
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 ' . |
|
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 | 65 | "array). You likely want to call ->data[{$k}])"; |
66 | 66 | |
67 | 67 | throw new Exception\InvalidArgumentException($msg); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $obj = Util\Util::convertToStripeObject($response, $opts); |
85 | 85 | if (!($obj instanceof \Stripe\Collection)) { |
86 | 86 | throw new \Stripe\Exception\UnexpectedValueException( |
87 | - 'Expected type ' . \Stripe\Collection::class . ', got "' . \get_class($obj) . '" instead.' |
|
87 | + 'Expected type '.\Stripe\Collection::class.', got "'.\get_class($obj).'" instead.' |
|
88 | 88 | ); |
89 | 89 | } |
90 | 90 | $obj->setFilters($params); |
@@ -54,7 +54,7 @@ |
||
54 | 54 | */ |
55 | 55 | public function cancel($params = null, $opts = null) |
56 | 56 | { |
57 | - $url = $this->instanceUrl() . '/cancel'; |
|
57 | + $url = $this->instanceUrl().'/cancel'; |
|
58 | 58 | list($response, $opts) = $this->_request('post', $url, $params, $opts); |
59 | 59 | $this->refreshFrom($response, $opts); |
60 | 60 |
@@ -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 |