@@ -57,7 +57,7 @@ |
||
57 | 57 | */ |
58 | 58 | public function approve($params = null, $opts = null) |
59 | 59 | { |
60 | - $url = $this->instanceUrl() . '/approve'; |
|
60 | + $url = $this->instanceUrl().'/approve'; |
|
61 | 61 | list($response, $opts) = $this->_request('post', $url, $params, $opts); |
62 | 62 | $this->refreshFrom($response, $opts); |
63 | 63 |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | public function deleteDiscount($params = null, $opts = null) |
79 | 79 | { |
80 | - $url = $this->instanceUrl() . '/discount'; |
|
80 | + $url = $this->instanceUrl().'/discount'; |
|
81 | 81 | list($response, $opts) = $this->_request('delete', $url, $params, $opts); |
82 | 82 | $this->refreshFrom(['discount' => null], $opts, true); |
83 | 83 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | */ |
96 | 96 | public static function allPaymentMethods($id, $params = null, $opts = null) |
97 | 97 | { |
98 | - $url = static::resourceUrl($id) . '/payment_methods'; |
|
98 | + $url = static::resourceUrl($id).'/payment_methods'; |
|
99 | 99 | list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); |
100 | 100 | $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts); |
101 | 101 | $obj->setLastResponse($response); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | public function retrievePaymentMethod($payment_method, $params = null, $opts = null) |
116 | 116 | { |
117 | - $url = $this->instanceUrl() . '/payment_methods/' . $payment_method; |
|
117 | + $url = $this->instanceUrl().'/payment_methods/'.$payment_method; |
|
118 | 118 | list($response, $opts) = $this->_request('get', $url, $params, $opts); |
119 | 119 | $obj = \Stripe\Util\Util::convertToStripeObject($response, $opts); |
120 | 120 | $obj->setLastResponse($response); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function approve($params = null, $opts = null) |
59 | 59 | { |
60 | - $url = $this->instanceUrl() . '/approve'; |
|
60 | + $url = $this->instanceUrl().'/approve'; |
|
61 | 61 | list($response, $opts) = $this->_request('post', $url, $params, $opts); |
62 | 62 | $this->refreshFrom($response, $opts); |
63 | 63 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function decline($params = null, $opts = null) |
76 | 76 | { |
77 | - $url = $this->instanceUrl() . '/decline'; |
|
77 | + $url = $this->instanceUrl().'/decline'; |
|
78 | 78 | list($response, $opts) = $this->_request('post', $url, $params, $opts); |
79 | 79 | $this->refreshFrom($response, $opts); |
80 | 80 |
@@ -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); |