@@ -22,7 +22,7 @@ |
||
22 | 22 | * @param PaymentInstrumentInterface $card |
23 | 23 | * @return bool |
24 | 24 | */ |
25 | - public function disable(PaymentInstrumentInterface $card):? bool; |
|
25 | + public function disable(PaymentInstrumentInterface $card): ? bool; |
|
26 | 26 | |
27 | 27 | /** |
28 | 28 | * @param CustomerInterface $customer |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | /** |
14 | 14 | * @return null|string |
15 | 15 | */ |
16 | - function getToken():? string; |
|
16 | + function getToken(): ? string; |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * @param null|string $token |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | /** |
36 | 36 | * @return null|string |
37 | 37 | */ |
38 | - function getType():? string; |
|
38 | + function getType(): ? string; |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * @param null|string $type |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | /** |
47 | 47 | * @return array|null |
48 | 48 | */ |
49 | - function getCard():? array; |
|
49 | + function getCard(): ? array; |
|
50 | 50 | |
51 | 51 | /** |
52 | 52 | * @param array|null $data |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | /** |
58 | 58 | * @return null|string |
59 | 59 | */ |
60 | - function getLast4Digits():? string; |
|
60 | + function getLast4Digits(): ? string; |
|
61 | 61 | |
62 | 62 | /** |
63 | 63 | * @param null|string $digits |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | /** |
69 | 69 | * @return null|string |
70 | 70 | */ |
71 | - function getCardType():? string; |
|
71 | + function getCardType(): ? string; |
|
72 | 72 | |
73 | 73 | /** |
74 | 74 | * @param null|string $schema |
@@ -58,9 +58,9 @@ discard block |
||
58 | 58 | * @param PaymentInstrumentInterface $paymentInstrument |
59 | 59 | * @return bool |
60 | 60 | */ |
61 | - public function disable(PaymentInstrumentInterface $paymentInstrument):?bool |
|
61 | + public function disable(PaymentInstrumentInterface $paymentInstrument): ?bool |
|
62 | 62 | { |
63 | - $uri = self::getEndPoint().'/'.$paymentInstrument->getToken(); |
|
63 | + $uri = self::getEndPoint() . '/' . $paymentInstrument->getToken(); |
|
64 | 64 | |
65 | 65 | return $this->request('delete', $paymentInstrument, $uri); |
66 | 66 | } |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | */ |
129 | 129 | function getEndPoint(): string |
130 | 130 | { |
131 | - return 'customers/'.$this->customer->getCustomerId().'/payment-instruments'; |
|
131 | + return 'customers/' . $this->customer->getCustomerId() . '/payment-instruments'; |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | /** |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | /** |
146 | 146 | * @return AccessToken |
147 | 147 | */ |
148 | - function getToken():? AccessToken |
|
148 | + function getToken(): ? AccessToken |
|
149 | 149 | { |
150 | 150 | return $this->token; |
151 | 151 | } |
@@ -179,7 +179,7 @@ |
||
179 | 179 | /** |
180 | 180 | * @return AccessToken |
181 | 181 | */ |
182 | - function getToken():? AccessToken |
|
182 | + function getToken(): ? AccessToken |
|
183 | 183 | { |
184 | 184 | return $this->token; |
185 | 185 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | * @param CustomerInterface $customer |
13 | 13 | * @return CustomerInterface |
14 | 14 | */ |
15 | - function create(CustomerInterface $customer):? CustomerInterface; |
|
15 | + function create(CustomerInterface $customer): ? CustomerInterface; |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * @param CustomerInterface $customer |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | * @return CheckoutInterface |
14 | 14 | * @see http://docs.sumup.com/rest-api/checkouts-api/#checkouts-create-checkout-post |
15 | 15 | */ |
16 | - public function create(CheckoutInterface $checkout):? CheckoutInterface; |
|
16 | + public function create(CheckoutInterface $checkout): ? CheckoutInterface; |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * Complete a checkout |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | * @return CheckoutInterface |
23 | 23 | * @see http://docs.sumup.com/rest-api/checkouts-api/#checkouts-complete-checkout-put |
24 | 24 | */ |
25 | - public function complete(CheckoutInterface $checkout):? CheckoutInterface; |
|
25 | + public function complete(CheckoutInterface $checkout): ? CheckoutInterface; |
|
26 | 26 | |
27 | 27 | /** |
28 | 28 | * @param CheckoutInterface $checkout |
@@ -42,12 +42,12 @@ discard block |
||
42 | 42 | /** |
43 | 43 | * @return float |
44 | 44 | */ |
45 | - function getAmount():? float; |
|
45 | + function getAmount(): ? float; |
|
46 | 46 | |
47 | 47 | /** |
48 | 48 | * @return float|null |
49 | 49 | */ |
50 | - function getFeeAmount():? float; |
|
50 | + function getFeeAmount(): ? float; |
|
51 | 51 | |
52 | 52 | /** |
53 | 53 | * @param float $amount |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | /** |
147 | 147 | * @return string |
148 | 148 | */ |
149 | - function getValidUntil():? string; |
|
149 | + function getValidUntil(): ? string; |
|
150 | 150 | |
151 | 151 | /** |
152 | 152 | * @param string $timestamp |
@@ -212,9 +212,9 @@ discard block |
||
212 | 212 | /** |
213 | 213 | * @return null|string |
214 | 214 | */ |
215 | - function getType():? string; |
|
215 | + function getType(): ? string; |
|
216 | 216 | |
217 | - function setInstallments(?string $installments):? self; |
|
218 | - function getInstallments():? string; |
|
217 | + function setInstallments(?string $installments): ? self; |
|
218 | + function getInstallments(): ? string; |
|
219 | 219 | |
220 | 220 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | * @throws BadResponseException |
39 | 39 | * @throws ConnectException |
40 | 40 | */ |
41 | - function create(CheckoutInterface $checkout, AccessToken $accessToken = null):? CheckoutInterface |
|
41 | + function create(CheckoutInterface $checkout, AccessToken $accessToken = null): ? CheckoutInterface |
|
42 | 42 | { |
43 | 43 | return $this->request('post', $checkout) ? $checkout : null; |
44 | 44 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | * @throws BadResponseException |
49 | 49 | * @throws ConnectException |
50 | 50 | */ |
51 | - function complete(CheckoutInterface $checkout, AccessToken $accessToken = null):? CheckoutInterface |
|
51 | + function complete(CheckoutInterface $checkout, AccessToken $accessToken = null): ? CheckoutInterface |
|
52 | 52 | { |
53 | 53 | return $this->request('put', $checkout) ? $checkout : null; |
54 | 54 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * @param string|null $endpoint |
60 | 60 | * @return bool|null |
61 | 61 | */ |
62 | - function request(string $action, $checkout, string $endpoint = null):? bool |
|
62 | + function request(string $action, $checkout, string $endpoint = null): ? bool |
|
63 | 63 | { |
64 | 64 | if (!$checkout->isValid()) { |
65 | 65 | throw new InvalidCheckoutException($checkout); |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | /** |
202 | 202 | * @return AccessToken |
203 | 203 | */ |
204 | - function getToken():? AccessToken |
|
204 | + function getToken(): ? AccessToken |
|
205 | 205 | { |
206 | 206 | return $this->currentToken; |
207 | 207 | } |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | static function getCompleteUrl(CheckoutInterface $checkout): string |
214 | 214 | { |
215 | 215 | if ($checkout->getId()) { |
216 | - return SumUp::getEntrypoint().$checkout->getId(); |
|
216 | + return SumUp::getEntrypoint() . $checkout->getId(); |
|
217 | 217 | } |
218 | 218 | |
219 | 219 | return ''; |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | function fillProperty(string $property, $value): void |
30 | 30 | { |
31 | 31 | $property = lcfirst(str_replace('_', '', ucwords($property, '_'))); |
32 | - if(property_exists(__CLASS__, $property)) |
|
32 | + if (property_exists(__CLASS__, $property)) |
|
33 | 33 | { |
34 | 34 | $method = sprintf('set%s', ucfirst($property)); |
35 | 35 | $this->{$method}($value); |
@@ -44,11 +44,11 @@ discard block |
||
44 | 44 | $reflection = new \ReflectionClass(__CLASS__); |
45 | 45 | $properties = $reflection->getProperties(\ReflectionProperty::IS_PROTECTED); |
46 | 46 | $data = []; |
47 | - foreach($properties as $property){ |
|
47 | + foreach ($properties as $property) { |
|
48 | 48 | $prop_name = $property->getName(); |
49 | 49 | $method = sprintf('get%s', ucfirst($prop_name)); |
50 | 50 | $form_name = strtolower(preg_replace('/[A-Z]/', '_$0', $prop_name)); |
51 | - if($reflection->hasMethod($method)){ |
|
51 | + if ($reflection->hasMethod($method)) { |
|
52 | 52 | $data[$form_name] = $this->{$method}(); |
53 | 53 | } |
54 | 54 | } |