@@ -68,5 +68,5 @@ |
||
68 | 68 | /** |
69 | 69 | * @return AccessToken |
70 | 70 | */ |
71 | - function getToken():? AccessToken; |
|
71 | + function getToken(): ? AccessToken; |
|
72 | 72 | } |
@@ -20,12 +20,12 @@ discard block |
||
20 | 20 | * @param integer $expiresIn |
21 | 21 | * @param string|null $scope |
22 | 22 | */ |
23 | - function __construct(string $token, string $type, int $expiresIn, string $scope = null){ |
|
23 | + function __construct(string $token, string $type, int $expiresIn, string $scope = null) { |
|
24 | 24 | $this->token = $token; |
25 | 25 | $this->type = $type; |
26 | 26 | $this->expiration = time() + $expiresIn; |
27 | 27 | |
28 | - if($scope !== null) { |
|
28 | + if ($scope !== null) { |
|
29 | 29 | $this->scope = $scope; |
30 | 30 | } |
31 | 31 | } |
@@ -86,9 +86,9 @@ discard block |
||
86 | 86 | * @param string $scope[,$scope[,$scope[,...]]] |
87 | 87 | * @return boolean |
88 | 88 | */ |
89 | - function canAccess(string $scope){ |
|
89 | + function canAccess(string $scope) { |
|
90 | 90 | $scopes = func_get_args(); |
91 | 91 | $diff = array_diff($scopes, $this->scope); |
92 | - return count($diff)>0; |
|
92 | + return count($diff) > 0; |
|
93 | 93 | } |
94 | 94 | } |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | * |
59 | 59 | * @return string |
60 | 60 | */ |
61 | - public function getToken():? string |
|
61 | + public function getToken(): ? string |
|
62 | 62 | { |
63 | 63 | return $this->token; |
64 | 64 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | * |
83 | 83 | * @return bool |
84 | 84 | */ |
85 | - public function getActive():? bool |
|
85 | + public function getActive(): ? bool |
|
86 | 86 | { |
87 | 87 | return $this->active; |
88 | 88 | } |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | * |
107 | 107 | * @return string |
108 | 108 | */ |
109 | - public function getType():? string |
|
109 | + public function getType(): ? string |
|
110 | 110 | { |
111 | 111 | return $this->type; |
112 | 112 | } |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | * |
131 | 131 | * @return string |
132 | 132 | */ |
133 | - public function getLast4Digits():? string |
|
133 | + public function getLast4Digits(): ? string |
|
134 | 134 | { |
135 | 135 | return $this->last4Digits; |
136 | 136 | } |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | * |
155 | 155 | * @return string |
156 | 156 | */ |
157 | - public function getCardType():? string |
|
157 | + public function getCardType(): ? string |
|
158 | 158 | { |
159 | 159 | return $this->cardSchema; |
160 | 160 | } |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | * @see http://docs.sumup.com/rest-api/checkouts-api/#customers-payment-instruments-post |
184 | 184 | * @return array |
185 | 185 | */ |
186 | - public function getCard():? array |
|
186 | + public function getCard(): ? array |
|
187 | 187 | { |
188 | 188 | return [ |
189 | 189 | 'last_4_digits' => $this->getLast4Digits(), |
@@ -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 |