Passed
Push — master ( d68831...58f816 )
by Bruce Pinheiro de
04:28
created
src/Customer/CustomerClientInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Checkout/CheckoutClientInterface.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 
7 7
 interface CheckoutClientInterface extends SumUpClientInterface
8 8
 {
9
-	/**
9
+    /**
10 10
      * Create a checkout
11 11
      *
12 12
      * @param CheckoutInterface $checkout
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     /**
28 28
      * @param CheckoutInterface $checkout
29 29
      * @return string
30
-	 */
30
+     */
31 31
     static function getCompleteUrl(CheckoutInterface $checkout): string;
32 32
 
33 33
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Checkout/Checkout.php 1 patch
Indentation   +356 added lines, -356 removed lines patch added patch discarded remove patch
@@ -11,378 +11,378 @@
 block discarded – undo
11 11
 
12 12
 class Checkout implements CheckoutInterface, PropertyHandlerInterface
13 13
 {
14
-	use PropertyHandler;
15
-
16
-	const PENDING = 'PENDING';
17
-	const COMPLETED = 'COMPLETED';
18
-	const FAILED = 'FAILED';
19
-
20
-	protected $id;
21
-	protected $status;
22
-	protected $amount;
23
-	protected $feeAmount;
24
-	protected $currency;
25
-	protected $payToEmail;
26
-	protected $payFromEmail;
27
-	protected $description;
28
-	protected $redirectUrl;
29
-	protected $validUntil;
30
-	protected $token;
31
-	protected $transactionId;
32
-	protected $transactionCode;
33
-	protected $type;
34
-	protected $installments;
35
-
36
-	/**
37
-	 * Checkout reference
38
-	 *
39
-	 * @var string
40
-	 */
41
-	protected $reference;
42
-
43
-	/**
44
-	 * Customer
45
-	 *
46
-	 * @var null|Customer
47
-	 */
48
-	protected $customer;
49
-
50
-	/**
14
+    use PropertyHandler;
15
+
16
+    const PENDING = 'PENDING';
17
+    const COMPLETED = 'COMPLETED';
18
+    const FAILED = 'FAILED';
19
+
20
+    protected $id;
21
+    protected $status;
22
+    protected $amount;
23
+    protected $feeAmount;
24
+    protected $currency;
25
+    protected $payToEmail;
26
+    protected $payFromEmail;
27
+    protected $description;
28
+    protected $redirectUrl;
29
+    protected $validUntil;
30
+    protected $token;
31
+    protected $transactionId;
32
+    protected $transactionCode;
33
+    protected $type;
34
+    protected $installments;
35
+
36
+    /**
37
+     * Checkout reference
38
+     *
39
+     * @var string
40
+     */
41
+    protected $reference;
42
+
43
+    /**
44
+     * Customer
45
+     *
46
+     * @var null|Customer
47
+     */
48
+    protected $customer;
49
+
50
+    /**
51 51
      * PaymentInstrument
52
-	 *
53
-	 *
52
+     *
53
+     *
54 54
      * @var null|PaymentInstrument
55
-	 */
56
-	protected $card;
55
+     */
56
+    protected $card;
57 57
 
58 58
 
59
-	/**
60
-	 * checkout constructor
61
-	 *
62
-	 * @param array $data
63
-	 */
64
-	public function __construct(array $data = null) {
65
-		if ($data !== null) {
59
+    /**
60
+     * checkout constructor
61
+     *
62
+     * @param array $data
63
+     */
64
+    public function __construct(array $data = null) {
65
+        if ($data !== null) {
66 66
             $this->setAmount($data['amount']??0);
67 67
             $this->setPayToEmail($data['pay_to_email']??'');
68 68
             $this->setCheckoutReference($data['checkout_reference']??'');
69 69
             $this->setCurrency($data['currency']??'');
70
-			$this->setDescription($data['description']??null);
71
-			$this->setFeeAmount($data['fee_amount']??null);
72
-			$this->setPayFromEmail($data['pay_from_mail']??null);
73
-			$this->setId($data['id']??null);
74
-			$this->setRedirectUrl($data['redirect_url']??null);
75
-			$this->setStatus($data['status']??null);
76
-		}
77
-	}
78
-
79
-	/**
80
-	 * @inheritDoc
81
-	 */
82
-	public function isValid(): bool {
83
-		return $this->getReference() !== null
84
-			&& $this->getAmount() !== null
85
-			&& $this->getPayToEmail() !== null
70
+            $this->setDescription($data['description']??null);
71
+            $this->setFeeAmount($data['fee_amount']??null);
72
+            $this->setPayFromEmail($data['pay_from_mail']??null);
73
+            $this->setId($data['id']??null);
74
+            $this->setRedirectUrl($data['redirect_url']??null);
75
+            $this->setStatus($data['status']??null);
76
+        }
77
+    }
78
+
79
+    /**
80
+     * @inheritDoc
81
+     */
82
+    public function isValid(): bool {
83
+        return $this->getReference() !== null
84
+            && $this->getAmount() !== null
85
+            && $this->getPayToEmail() !== null
86 86
             && $this->getAmount() > 0
87
-			&& Currency::isValid($this->getCurrency());
88
-	}
89
-
90
-	/**
91
-	 * @inheritDoc
92
-	 */
93
-	public function getId():? string {
94
-		return $this->id;
95
-	}
96
-
97
-	/**
98
-	 * @inheritDoc
99
-	 */
100
-	public function setId(?string $id): CheckoutInterface {
101
-		$this->id = $id;
102
-		return $this;
103
-	}
104
-
105
-	/**
106
-	 * @inheritDoc
107
-	 */
108
-	public function getStatus():? string {
109
-		return $this->status;
110
-	}
111
-
112
-	/**
113
-	 * @inheritDoc
114
-	 */
115
-	public function setStatus(?string $status): CheckoutInterface {
116
-		$this->status = $status;
117
-		return $this;
118
-	}
119
-
120
-	/**
121
-	 * @inheritDoc
122
-	 */
123
-	public function getAmount():? float {
124
-		return $this->amount;
125
-	}
126
-
127
-	/**
128
-	 * @inheritDoc
129
-	 */
130
-	public function setAmount(float $amount): CheckoutInterface {
131
-		$this->amount = $amount > 0 ? $amount : null;
132
-		return $this;
133
-	}
134
-
135
-	/**
136
-	 * @inheritDoc
137
-	 */
138
-	public function getCurrency():? string {
139
-		return $this->currency;
140
-	}
141
-
142
-	/**
143
-	 * @inheritDoc
144
-	 */
145
-	public function setCurrency(?string $currency): CheckoutInterface {
146
-		$this->currency = $currency;
147
-		return $this;
148
-	}
149
-
150
-	/**
151
-	 * @inheritDoc
152
-	 */
153
-	public function getPayToEmail():? string {
154
-		return $this->payToEmail;
155
-	}
156
-
157
-	/**
158
-	 * @inheritDoc
159
-	 */
160
-	public function setPayToEmail(string $email): CheckoutInterface {
161
-		$this->payToEmail = trim($email) === '' ? null : $email;
162
-		return $this;
163
-	}
164
-
165
-	/**
166
-	 * @inheritDoc
167
-	 */
168
-	public function getCheckoutReference():? string {
169
-		return $this->reference;
170
-	}
171
-
172
-	/**
173
-	 * @inheritDoc
174
-	 */
175
-	public function setCheckoutReference(string $reference): CheckoutInterface {
176
-		$this->reference = trim($reference) === '' ? null : $reference;
177
-		return $this;
178
-	}
179
-
180
-	/**
181
-	 * @inheritDoc
182
-	 */
183
-	public function getDescription():? string {
184
-		return $this->description;
185
-	}
186
-
187
-	/**
188
-	 * @inheritDoc
189
-	 */
190
-	public function setDescription(?string $description): CheckoutInterface {
191
-		$this->description = $description;
192
-		return $this;
193
-	}
194
-
195
-	/**
196
-	 * @inheritDoc
197
-	 */
198
-	public function getFeeAmount():? float {
199
-		return $this->feeAmount;
200
-	}
201
-
202
-	/**
203
-	 * @inheritDoc
204
-	 */
205
-	public function setFeeAmount(?float $fee): CheckoutInterface {
206
-		$this->feeAmount = $fee;
207
-		return $this;
208
-	}
209
-
210
-	/**
211
-	 * @inheritDoc
212
-	 */
213
-	public function getPayFromEmail():? string {
214
-		return $this->payFromEmail;
215
-	}
216
-
217
-	/**
218
-	 * @inheritDoc
219
-	 */
220
-	public function setPayFromEmail(?string $email): CheckoutInterface {
221
-		$this->payFromEmail = $email;
222
-		return $this;
223
-	}
224
-
225
-	/**
226
-	 * @inheritDoc
227
-	 */
228
-	public function getRedirectUrl():? string {
229
-		return $this->redirectUrl;
230
-	}
231
-
232
-	/**
233
-	 * @inheritDoc
234
-	 */
235
-	public function setRedirectUrl(?string $url): CheckoutInterface {
236
-		$this->redirectUrl = $url;
237
-		return $this;
238
-	}
239
-
240
-	function getValidUntil():? string {
241
-		return $this->validUntil;
242
-	}
243
-
244
-	function setValidUntil(?string $timestamp): CheckoutInterface {
245
-		$this->validUntil = $timestamp;
246
-		return $this;
247
-	}
248
-
249
-	function getTransactionCode():? string {
250
-		return $this->transactionCode;
251
-	}
252
-
253
-	function setTransactionCode(?string $code): CheckoutInterface {
254
-		$this->transactionCode = $code;
255
-		return $this;
256
-	}
257
-
258
-	function getTransactionId():? string {
259
-		return $this->transactionId;
260
-	}
261
-
262
-	function setTransactionId(?string $id): CheckoutInterface {
263
-		$this->transactionId = $id;
264
-		return $this;
265
-	}
266
-
267
-	function getTransactions():? array {
87
+            && Currency::isValid($this->getCurrency());
88
+    }
89
+
90
+    /**
91
+     * @inheritDoc
92
+     */
93
+    public function getId():? string {
94
+        return $this->id;
95
+    }
96
+
97
+    /**
98
+     * @inheritDoc
99
+     */
100
+    public function setId(?string $id): CheckoutInterface {
101
+        $this->id = $id;
102
+        return $this;
103
+    }
104
+
105
+    /**
106
+     * @inheritDoc
107
+     */
108
+    public function getStatus():? string {
109
+        return $this->status;
110
+    }
111
+
112
+    /**
113
+     * @inheritDoc
114
+     */
115
+    public function setStatus(?string $status): CheckoutInterface {
116
+        $this->status = $status;
117
+        return $this;
118
+    }
119
+
120
+    /**
121
+     * @inheritDoc
122
+     */
123
+    public function getAmount():? float {
124
+        return $this->amount;
125
+    }
126
+
127
+    /**
128
+     * @inheritDoc
129
+     */
130
+    public function setAmount(float $amount): CheckoutInterface {
131
+        $this->amount = $amount > 0 ? $amount : null;
132
+        return $this;
133
+    }
134
+
135
+    /**
136
+     * @inheritDoc
137
+     */
138
+    public function getCurrency():? string {
139
+        return $this->currency;
140
+    }
141
+
142
+    /**
143
+     * @inheritDoc
144
+     */
145
+    public function setCurrency(?string $currency): CheckoutInterface {
146
+        $this->currency = $currency;
147
+        return $this;
148
+    }
149
+
150
+    /**
151
+     * @inheritDoc
152
+     */
153
+    public function getPayToEmail():? string {
154
+        return $this->payToEmail;
155
+    }
156
+
157
+    /**
158
+     * @inheritDoc
159
+     */
160
+    public function setPayToEmail(string $email): CheckoutInterface {
161
+        $this->payToEmail = trim($email) === '' ? null : $email;
162
+        return $this;
163
+    }
164
+
165
+    /**
166
+     * @inheritDoc
167
+     */
168
+    public function getCheckoutReference():? string {
169
+        return $this->reference;
170
+    }
171
+
172
+    /**
173
+     * @inheritDoc
174
+     */
175
+    public function setCheckoutReference(string $reference): CheckoutInterface {
176
+        $this->reference = trim($reference) === '' ? null : $reference;
177
+        return $this;
178
+    }
179
+
180
+    /**
181
+     * @inheritDoc
182
+     */
183
+    public function getDescription():? string {
184
+        return $this->description;
185
+    }
186
+
187
+    /**
188
+     * @inheritDoc
189
+     */
190
+    public function setDescription(?string $description): CheckoutInterface {
191
+        $this->description = $description;
192
+        return $this;
193
+    }
194
+
195
+    /**
196
+     * @inheritDoc
197
+     */
198
+    public function getFeeAmount():? float {
199
+        return $this->feeAmount;
200
+    }
201
+
202
+    /**
203
+     * @inheritDoc
204
+     */
205
+    public function setFeeAmount(?float $fee): CheckoutInterface {
206
+        $this->feeAmount = $fee;
207
+        return $this;
208
+    }
209
+
210
+    /**
211
+     * @inheritDoc
212
+     */
213
+    public function getPayFromEmail():? string {
214
+        return $this->payFromEmail;
215
+    }
216
+
217
+    /**
218
+     * @inheritDoc
219
+     */
220
+    public function setPayFromEmail(?string $email): CheckoutInterface {
221
+        $this->payFromEmail = $email;
222
+        return $this;
223
+    }
224
+
225
+    /**
226
+     * @inheritDoc
227
+     */
228
+    public function getRedirectUrl():? string {
229
+        return $this->redirectUrl;
230
+    }
231
+
232
+    /**
233
+     * @inheritDoc
234
+     */
235
+    public function setRedirectUrl(?string $url): CheckoutInterface {
236
+        $this->redirectUrl = $url;
237
+        return $this;
238
+    }
239
+
240
+    function getValidUntil():? string {
241
+        return $this->validUntil;
242
+    }
243
+
244
+    function setValidUntil(?string $timestamp): CheckoutInterface {
245
+        $this->validUntil = $timestamp;
246
+        return $this;
247
+    }
248
+
249
+    function getTransactionCode():? string {
250
+        return $this->transactionCode;
251
+    }
252
+
253
+    function setTransactionCode(?string $code): CheckoutInterface {
254
+        $this->transactionCode = $code;
255
+        return $this;
256
+    }
257
+
258
+    function getTransactionId():? string {
259
+        return $this->transactionId;
260
+    }
261
+
262
+    function setTransactionId(?string $id): CheckoutInterface {
263
+        $this->transactionId = $id;
264
+        return $this;
265
+    }
266
+
267
+    function getTransactions():? array {
268 268
 //        return $this->transactions;
269
-		//TODO remember myself whats is it.
270
-		return [];
271
-	}
269
+        //TODO remember myself whats is it.
270
+        return [];
271
+    }
272 272
 
273
-	function setTransactions(?Array $transactions): CheckoutInterface {
273
+    function setTransactions(?Array $transactions): CheckoutInterface {
274 274
 //        $this->transactions = $transactions;
275
-		//TODO remember myself whats is it.
276
-		return $this;
277
-	}
278
-
279
-	function getToken():? string {
280
-		return $this->token;
281
-	}
282
-
283
-	function setToken(?string $token): CheckoutInterface {
284
-		$this->token = $token;
285
-		return $this;
286
-	}
287
-
288
-	/**
289
-	 * Get customer
290
-	 * @return CustomerInterface|null
291
-	 */
292
-	public function getCustomer(): ?CustomerInterface
293
-	{
294
-		return $this->customer;
295
-	}
296
-
297
-	/**
298
-	 * Set customer
299
-	 *
300
-	 * @param  null|CustomerInterface  $customer  Customer
301
-	 *
302
-	 * @return  CheckoutInterface
303
-	 */
304
-	public function setCustomer(?CustomerInterface $customer): CheckoutInterface
305
-	{
306
-		$this->customer = $customer;
307
-
308
-		return $this;
309
-	}
310
-
311
-	/**
312
-	 * Get card
313
-	 *
275
+        //TODO remember myself whats is it.
276
+        return $this;
277
+    }
278
+
279
+    function getToken():? string {
280
+        return $this->token;
281
+    }
282
+
283
+    function setToken(?string $token): CheckoutInterface {
284
+        $this->token = $token;
285
+        return $this;
286
+    }
287
+
288
+    /**
289
+     * Get customer
290
+     * @return CustomerInterface|null
291
+     */
292
+    public function getCustomer(): ?CustomerInterface
293
+    {
294
+        return $this->customer;
295
+    }
296
+
297
+    /**
298
+     * Set customer
299
+     *
300
+     * @param  null|CustomerInterface  $customer  Customer
301
+     *
302
+     * @return  CheckoutInterface
303
+     */
304
+    public function setCustomer(?CustomerInterface $customer): CheckoutInterface
305
+    {
306
+        $this->customer = $customer;
307
+
308
+        return $this;
309
+    }
310
+
311
+    /**
312
+     * Get card
313
+     *
314 314
      * @return  null|PaymentInstrumentInterface
315
-	 */
315
+     */
316 316
     public function getCard(): ?PaymentInstrumentInterface
317
-	{
318
-		return $this->card;
319
-	}
317
+    {
318
+        return $this->card;
319
+    }
320 320
 
321
-	/**
322
-	 * Set card
323
-	 *
321
+    /**
322
+     * Set card
323
+     *
324 324
      * @param  null|PaymentInstrumentInterface $card
325
-	 *
326
-	 * @return  CheckoutInterface
327
-	 */
325
+     *
326
+     * @return  CheckoutInterface
327
+     */
328 328
     public function setCard(?PaymentInstrumentInterface $card): CheckoutInterface
329
-	{
330
-		$this->card = $card;
331
-
332
-		return $this;
333
-	}
334
-
335
-	/**
336
-	 * Get checkout reference
337
-	 *
338
-	 * @return  string
339
-	 */
340
-	public function getReference(): ?string
341
-	{
342
-		return $this->reference;
343
-	}
344
-
345
-	/**
346
-	 * Set checkout reference
347
-	 *
348
-	 * @param  string  $reference  Checkout reference
349
-	 *
350
-	 * @return  CheckoutInterface
351
-	 */
352
-	public function setReference(?string $reference): CheckoutInterface
353
-	{
354
-		$this->reference = $reference;
355
-
356
-		return $this;
357
-	}
358
-
359
-	/**
360
-	 * @return mixed
361
-	 */
362
-	public function getType():? string
363
-	{
364
-		return $this->type;
365
-	}
366
-
367
-	/**
368
-	 * @param mixed $type
369
-	 * @return CheckoutInterface
370
-	 */
371
-	public function setType(?string $type = null): CheckoutInterface
372
-	{
373
-		$this->type = $type;
374
-
375
-		return $this;
376
-	}
377
-
378
-	public function setInstallments(?string $installments): CheckoutInterface{
379
-		$this->installments = $installments;
380
-		return $this;
381
-	}
382
-
383
-	public function getInstallments(): string
384
-	{
385
-		return $this->installments;
386
-	}
329
+    {
330
+        $this->card = $card;
331
+
332
+        return $this;
333
+    }
334
+
335
+    /**
336
+     * Get checkout reference
337
+     *
338
+     * @return  string
339
+     */
340
+    public function getReference(): ?string
341
+    {
342
+        return $this->reference;
343
+    }
344
+
345
+    /**
346
+     * Set checkout reference
347
+     *
348
+     * @param  string  $reference  Checkout reference
349
+     *
350
+     * @return  CheckoutInterface
351
+     */
352
+    public function setReference(?string $reference): CheckoutInterface
353
+    {
354
+        $this->reference = $reference;
355
+
356
+        return $this;
357
+    }
358
+
359
+    /**
360
+     * @return mixed
361
+     */
362
+    public function getType():? string
363
+    {
364
+        return $this->type;
365
+    }
366
+
367
+    /**
368
+     * @param mixed $type
369
+     * @return CheckoutInterface
370
+     */
371
+    public function setType(?string $type = null): CheckoutInterface
372
+    {
373
+        $this->type = $type;
374
+
375
+        return $this;
376
+    }
377
+
378
+    public function setInstallments(?string $installments): CheckoutInterface{
379
+        $this->installments = $installments;
380
+        return $this;
381
+    }
382
+
383
+    public function getInstallments(): string
384
+    {
385
+        return $this->installments;
386
+    }
387 387
 
388 388
 }
Please login to merge, or discard this patch.
src/Checkout/CheckoutInterface.php 2 patches
Indentation   +198 added lines, -198 removed lines patch added patch discarded remove patch
@@ -10,211 +10,211 @@
 block discarded – undo
10 10
  */
11 11
 interface CheckoutInterface
12 12
 {
13
-	/**
14
-	 * @return null|string
15
-	 */
16
-	function getId(): ?string;
17
-
18
-	/**
19
-	 * @param string $id
20
-	 * @return CheckoutInterface
21
-	 */
22
-	function setId(string $id): self;
23
-
24
-	/**
25
-	 * @return null|string
26
-	 */
27
-	function getStatus(): ?string;
28
-
29
-	/**
30
-	 * @param string $status
31
-	 * @return CheckoutInterface
32
-	 */
33
-	function setStatus(string $status): self;
34
-
35
-
36
-	/**
37
-	 * @param float $amount
38
-	 * @return CheckoutInterface
39
-	 */
40
-	function setAmount(float $amount): self;
41
-
42
-	/**
43
-	 * @return float
44
-	 */
45
-	function getAmount():? float;
46
-
47
-	/**
48
-	 * @return float|null
49
-	 */
13
+    /**
14
+     * @return null|string
15
+     */
16
+    function getId(): ?string;
17
+
18
+    /**
19
+     * @param string $id
20
+     * @return CheckoutInterface
21
+     */
22
+    function setId(string $id): self;
23
+
24
+    /**
25
+     * @return null|string
26
+     */
27
+    function getStatus(): ?string;
28
+
29
+    /**
30
+     * @param string $status
31
+     * @return CheckoutInterface
32
+     */
33
+    function setStatus(string $status): self;
34
+
35
+
36
+    /**
37
+     * @param float $amount
38
+     * @return CheckoutInterface
39
+     */
40
+    function setAmount(float $amount): self;
41
+
42
+    /**
43
+     * @return float
44
+     */
45
+    function getAmount():? float;
46
+
47
+    /**
48
+     * @return float|null
49
+     */
50 50
     function getFeeAmount():? float;
51 51
 
52
-	/**
53
-	 * @param float $amount
54
-	 * @return CheckoutInterface
55
-	 */
56
-	function setFeeAmount(float $amount): self;
57
-
58
-	/**
59
-	 * @return null|string
60
-	 */
61
-	function getCurrency(): ?string;
62
-
63
-	/**
64
-	 * @param string $currency
65
-	 * @return CheckoutInterface
66
-	 */
67
-	function setCurrency(string $currency): self;
68
-
69
-	/**
70
-	 * @return CustomerInterface|null
71
-	 */
72
-	function getCustomer(): ?CustomerInterface;
73
-
74
-	/**
75
-	 * @param CustomerInterface $customer
76
-	 * @return CheckoutInterface
77
-	 */
78
-	function setCustomer(CustomerInterface $customer): self;
79
-
80
-	/**
52
+    /**
53
+     * @param float $amount
54
+     * @return CheckoutInterface
55
+     */
56
+    function setFeeAmount(float $amount): self;
57
+
58
+    /**
59
+     * @return null|string
60
+     */
61
+    function getCurrency(): ?string;
62
+
63
+    /**
64
+     * @param string $currency
65
+     * @return CheckoutInterface
66
+     */
67
+    function setCurrency(string $currency): self;
68
+
69
+    /**
70
+     * @return CustomerInterface|null
71
+     */
72
+    function getCustomer(): ?CustomerInterface;
73
+
74
+    /**
75
+     * @param CustomerInterface $customer
76
+     * @return CheckoutInterface
77
+     */
78
+    function setCustomer(CustomerInterface $customer): self;
79
+
80
+    /**
81 81
      * @return PaymentInstrumentInterface|null
82
-	 */
82
+     */
83 83
     function getCard(): ?PaymentInstrumentInterface;
84 84
 
85
-	/**
85
+    /**
86 86
      * @param PaymentInstrumentInterface $card
87
-	 * @return CheckoutInterface
88
-	 */
87
+     * @return CheckoutInterface
88
+     */
89 89
     function setCard(PaymentInstrumentInterface $card): self;
90 90
 
91
-	/**
92
-	 * @return null|string
93
-	 */
94
-	function getPayToEmail(): ?string;
95
-
96
-	/**
97
-	 * @param string $email
98
-	 * @return CheckoutInterface
99
-	 */
100
-	function setPayToEmail(string $email): self;
101
-
102
-	/**
103
-	 * @return null|string
104
-	 */
105
-	function getPayFromEmail(): ?string;
106
-
107
-	/**
108
-	 * @param string $email
109
-	 * @return CheckoutInterface
110
-	 */
111
-	function setPayFromEmail(string $email): self;
112
-
113
-	/**
114
-	 * @return null|string
115
-	 */
116
-	function getReference(): ?string;
117
-
118
-	/**
119
-	 * @param string $reference
120
-	 * @return CheckoutInterface
121
-	 */
122
-	function setReference(string $reference): self;
123
-
124
-	/**
125
-	 * @return null|string
126
-	 */
127
-	function getDescription(): ?string;
128
-
129
-	/**
130
-	 * @param string $description
131
-	 * @return CheckoutInterface
132
-	 */
133
-	function setDescription(string $description): self;
134
-
135
-	/**
136
-	 * @return null|string
137
-	 */
138
-	function getRedirectUrl(): ?string;
139
-
140
-	/**
141
-	 * @param string $url
142
-	 * @return CheckoutInterface
143
-	 */
144
-	function setRedirectUrl(string $url): self;
145
-
146
-	/**
147
-	 * @return string
148
-	 */
149
-	function getValidUntil():? string;
150
-
151
-	/**
152
-	 * @param string $timestamp
153
-	 * @return CheckoutInterface
154
-	 */
155
-	function setValidUntil(string $timestamp): self;
156
-
157
-	/**
158
-	 * @return null|string
159
-	 */
160
-	function getTransactionCode(): ?string;
161
-
162
-	/**
163
-	 * @param string $code
164
-	 * @return CheckoutInterface
165
-	 */
166
-	function setTransactionCode(string $code): self;
167
-
168
-	/**
169
-	 * @return null|string
170
-	 */
171
-	function getTransactionId(): ?string;
172
-
173
-	/**
174
-	 * @param string $id
175
-	 * @return CheckoutInterface
176
-	 */
177
-	function setTransactionId(string $id): self;
178
-
179
-	/**
180
-	 * @return array|null
181
-	 */
182
-	function getTransactions(): ?array;
183
-
184
-	/**
185
-	 * @param array $transactions
186
-	 * @return CheckoutInterface
187
-	 */
188
-	function setTransactions(array $transactions): self;
189
-
190
-	/**
191
-	 * @return null|string
192
-	 */
193
-	function getToken(): ?string;
194
-
195
-	/**
196
-	 * @param string $token
197
-	 * @return CheckoutInterface
198
-	 */
199
-	function setToken(string $token): self;
200
-
201
-	/**
202
-	 * @return bool|null
203
-	 */
204
-	function isValid(): ?bool;
205
-
206
-	/**
207
-	 * @param string|null $type
208
-	 * @return CheckoutInterface
209
-	 */
210
-	function setType(string $type = null): self;
211
-
212
-	/**
213
-	 * @return null|string
214
-	 */
215
-	function getType():? string;
216
-
217
-	function setInstallments(?string $installments):? self;
218
-	function getInstallments():? string;
91
+    /**
92
+     * @return null|string
93
+     */
94
+    function getPayToEmail(): ?string;
95
+
96
+    /**
97
+     * @param string $email
98
+     * @return CheckoutInterface
99
+     */
100
+    function setPayToEmail(string $email): self;
101
+
102
+    /**
103
+     * @return null|string
104
+     */
105
+    function getPayFromEmail(): ?string;
106
+
107
+    /**
108
+     * @param string $email
109
+     * @return CheckoutInterface
110
+     */
111
+    function setPayFromEmail(string $email): self;
112
+
113
+    /**
114
+     * @return null|string
115
+     */
116
+    function getReference(): ?string;
117
+
118
+    /**
119
+     * @param string $reference
120
+     * @return CheckoutInterface
121
+     */
122
+    function setReference(string $reference): self;
123
+
124
+    /**
125
+     * @return null|string
126
+     */
127
+    function getDescription(): ?string;
128
+
129
+    /**
130
+     * @param string $description
131
+     * @return CheckoutInterface
132
+     */
133
+    function setDescription(string $description): self;
134
+
135
+    /**
136
+     * @return null|string
137
+     */
138
+    function getRedirectUrl(): ?string;
139
+
140
+    /**
141
+     * @param string $url
142
+     * @return CheckoutInterface
143
+     */
144
+    function setRedirectUrl(string $url): self;
145
+
146
+    /**
147
+     * @return string
148
+     */
149
+    function getValidUntil():? string;
150
+
151
+    /**
152
+     * @param string $timestamp
153
+     * @return CheckoutInterface
154
+     */
155
+    function setValidUntil(string $timestamp): self;
156
+
157
+    /**
158
+     * @return null|string
159
+     */
160
+    function getTransactionCode(): ?string;
161
+
162
+    /**
163
+     * @param string $code
164
+     * @return CheckoutInterface
165
+     */
166
+    function setTransactionCode(string $code): self;
167
+
168
+    /**
169
+     * @return null|string
170
+     */
171
+    function getTransactionId(): ?string;
172
+
173
+    /**
174
+     * @param string $id
175
+     * @return CheckoutInterface
176
+     */
177
+    function setTransactionId(string $id): self;
178
+
179
+    /**
180
+     * @return array|null
181
+     */
182
+    function getTransactions(): ?array;
183
+
184
+    /**
185
+     * @param array $transactions
186
+     * @return CheckoutInterface
187
+     */
188
+    function setTransactions(array $transactions): self;
189
+
190
+    /**
191
+     * @return null|string
192
+     */
193
+    function getToken(): ?string;
194
+
195
+    /**
196
+     * @param string $token
197
+     * @return CheckoutInterface
198
+     */
199
+    function setToken(string $token): self;
200
+
201
+    /**
202
+     * @return bool|null
203
+     */
204
+    function isValid(): ?bool;
205
+
206
+    /**
207
+     * @param string|null $type
208
+     * @return CheckoutInterface
209
+     */
210
+    function setType(string $type = null): self;
211
+
212
+    /**
213
+     * @return null|string
214
+     */
215
+    function getType():? string;
216
+
217
+    function setInstallments(?string $installments):? self;
218
+    function getInstallments():? string;
219 219
 
220 220
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Checkout/CheckoutClient.php 2 patches
Indentation   +112 added lines, -112 removed lines patch added patch discarded remove patch
@@ -22,71 +22,71 @@  discard block
 block discarded – undo
22 22
         request as protected traitRequest;
23 23
     }
24 24
 
25
-	protected $context;
26
-	protected $lastResponse;
25
+    protected $context;
26
+    protected $lastResponse;
27 27
     protected $options;
28 28
     protected $currentToken;
29 29
 
30 30
     function __construct(ContextInterface $context, ?array $options = [])
31
-	{
32
-		$this->context = $context;
31
+    {
32
+        $this->context = $context;
33 33
         $this->options = $options;
34
-	}
34
+    }
35 35
 
36
-	/**
37
-	 * @inheritDoc
38
-	 * @throws BadResponseException
39
-	 * @throws ConnectException
40
-	 */
36
+    /**
37
+     * @inheritDoc
38
+     * @throws BadResponseException
39
+     * @throws ConnectException
40
+     */
41 41
     function create(CheckoutInterface $checkout, AccessToken $accessToken = null):? CheckoutInterface
42
-	{
42
+    {
43 43
         return $this->request('post', $checkout) ? $checkout : null;
44
-	}
44
+    }
45 45
 
46
-	/**
47
-	 * @inheritDoc
48
-	 * @throws BadResponseException
49
-	 * @throws ConnectException
50
-	 */
46
+    /**
47
+     * @inheritDoc
48
+     * @throws BadResponseException
49
+     * @throws ConnectException
50
+     */
51 51
     function complete(CheckoutInterface $checkout, AccessToken $accessToken = null):? CheckoutInterface
52
-	{
52
+    {
53 53
         return $this->request('put', $checkout) ? $checkout : null;
54
-	}
54
+    }
55 55
 
56
-	/**
57
-	 * @param string $action
58
-	 * @param CheckoutInterface $checkout
56
+    /**
57
+     * @param string $action
58
+     * @param CheckoutInterface $checkout
59 59
      * @param string|null $endpoint
60
-	 * @return bool|null
61
-	 */
60
+     * @return bool|null
61
+     */
62 62
     function request(string $action, $checkout, string $endpoint = null):? bool
63
-	{
63
+    {
64 64
         if (!$checkout->isValid()) {
65 65
             throw new InvalidCheckoutException($checkout);
66
-		}
66
+        }
67 67
 
68 68
         return $this->traitRequest($action, $checkout);
69
-	}
70
-
71
-	/**
72
-	 * Generate a body to create a new checkout
73
-	 *
74
-	 * @param CheckoutInterface $checkout
75
-	 * @return array
76
-	 */
69
+    }
70
+
71
+    /**
72
+     * Generate a body to create a new checkout
73
+     *
74
+     * @param CheckoutInterface $checkout
75
+     * @return array
76
+     */
77 77
     protected static function getCheckoutBody(CheckoutInterface $checkout): array
78
-	{
79
-		return [
80
-			"checkout_reference" => $checkout->getReference(),
81
-			"amount" => $checkout->getAmount(),
82
-			"currency" => $checkout->getCurrency(),
83
-			"fee_amount" => $checkout->getFeeAmount(),
84
-			"pay_to_email" => $checkout->getPayToEmail(),
85
-			"pay_from_email" => $checkout->getPayFromEmail(),
86
-			"description" => $checkout->getDescription(),
87
-			"return_url" => $checkout->getRedirectUrl(),
88
-		];
89
-	}
78
+    {
79
+        return [
80
+            "checkout_reference" => $checkout->getReference(),
81
+            "amount" => $checkout->getAmount(),
82
+            "currency" => $checkout->getCurrency(),
83
+            "fee_amount" => $checkout->getFeeAmount(),
84
+            "pay_to_email" => $checkout->getPayToEmail(),
85
+            "pay_from_email" => $checkout->getPayFromEmail(),
86
+            "description" => $checkout->getDescription(),
87
+            "return_url" => $checkout->getRedirectUrl(),
88
+        ];
89
+    }
90 90
 
91 91
     /**
92 92
      * @param CheckoutInterface $checkout
@@ -94,74 +94,74 @@  discard block
 block discarded – undo
94 94
      * @return array
95 95
      */
96 96
     static function getBody($checkout, string $type = null): array
97
-	{
98
-		$defaultBody = self::getCheckoutBody($checkout);
99
-		switch ($checkout->getType()) {
100
-			case 'card':
101
-				$completeBody = self::getCardBody($checkout);
102
-				break;
103
-
104
-			case 'boleto':
105
-				$completeBody = self::getBoletoBody($checkout);
106
-				break;
107
-
108
-			default:
109
-				$completeBody = [];
110
-		}
111
-
112
-		return array_merge($defaultBody, $completeBody);
113
-	}
114
-
115
-	private static function getCardBody(CheckoutInterface $checkout): array
116
-	{
117
-		return [
118
-			'payment_type' => $checkout->getType(),
119
-			'token' => $checkout->getCard()->getToken(),
120
-			'customer_id' => $checkout->getCustomer()->getCustomerId()
121
-		];
122
-	}
123
-
124
-	private static function getBoletoBody(CheckoutInterface $checkout): array
125
-	{
126
-		$customer = $checkout->getCustomer();
127
-		return [
128
-			'payment_type' => $checkout->getType(),
129
-			'description' => $checkout->getDescription(),
130
-			'boleto_details' => [
97
+    {
98
+        $defaultBody = self::getCheckoutBody($checkout);
99
+        switch ($checkout->getType()) {
100
+            case 'card':
101
+                $completeBody = self::getCardBody($checkout);
102
+                break;
103
+
104
+            case 'boleto':
105
+                $completeBody = self::getBoletoBody($checkout);
106
+                break;
107
+
108
+            default:
109
+                $completeBody = [];
110
+        }
111
+
112
+        return array_merge($defaultBody, $completeBody);
113
+    }
114
+
115
+    private static function getCardBody(CheckoutInterface $checkout): array
116
+    {
117
+        return [
118
+            'payment_type' => $checkout->getType(),
119
+            'token' => $checkout->getCard()->getToken(),
120
+            'customer_id' => $checkout->getCustomer()->getCustomerId()
121
+        ];
122
+    }
123
+
124
+    private static function getBoletoBody(CheckoutInterface $checkout): array
125
+    {
126
+        $customer = $checkout->getCustomer();
127
+        return [
128
+            'payment_type' => $checkout->getType(),
129
+            'description' => $checkout->getDescription(),
130
+            'boleto_details' => [
131 131
 //				'cpf_cnpj' => $customer->getCpfCnpj(),
132
-				'payer_name' => $customer->getName(),
133
-				'payer_address' => $customer->getAddress(),
134
-				'payer_city' => $customer->getAddress()->getCity(),
135
-				'payer_state_code' => $customer->getAddress()->getState(),
136
-				'payer_post_code' => $customer->getAddress()->getPostalCode()
137
-			],
138
-		];
139
-	}
140
-
141
-	/**
142
-	 * @inheritDoc
143
-	 */
132
+                'payer_name' => $customer->getName(),
133
+                'payer_address' => $customer->getAddress(),
134
+                'payer_city' => $customer->getAddress()->getCity(),
135
+                'payer_state_code' => $customer->getAddress()->getState(),
136
+                'payer_post_code' => $customer->getAddress()->getPostalCode()
137
+            ],
138
+        ];
139
+    }
140
+
141
+    /**
142
+     * @inheritDoc
143
+     */
144 144
     static function getScopes(): array
145
-	{
146
-		return [
147
-			'payments',
148
-			'boleto'
149
-		];
150
-	}
151
-
152
-	function getLastResponse(): ResponseInterface
153
-	{
154
-		return $this->lastResponse;
155
-	}
156
-
157
-	/**
158
-	 * return the context used to created the client.
159
-	 * @return ContextInterface
160
-	 */
161
-	function getContext(): ContextInterface
162
-	{
163
-		return $this->context;
164
-	}
145
+    {
146
+        return [
147
+            'payments',
148
+            'boleto'
149
+        ];
150
+    }
151
+
152
+    function getLastResponse(): ResponseInterface
153
+    {
154
+        return $this->lastResponse;
155
+    }
156
+
157
+    /**
158
+     * return the context used to created the client.
159
+     * @return ContextInterface
160
+     */
161
+    function getContext(): ContextInterface
162
+    {
163
+        return $this->context;
164
+    }
165 165
 
166 166
     function getOptions(): array
167 167
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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 '';
Please login to merge, or discard this patch.
src/SumUp.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -7,29 +7,29 @@
 block discarded – undo
7 7
 
8 8
 class SumUp
9 9
 {
10
-	const VERSION = 'v0.1';
11
-	const ENTRYPOINT = 'https://api.sumup.com/';
10
+    const VERSION = 'v0.1';
11
+    const ENTRYPOINT = 'https://api.sumup.com/';
12 12
 
13
-	/**
13
+    /**
14 14
      * @param array $options
15 15
      * @return ClientInterface
16
-	 */
16
+     */
17 17
     static function getClient(array $options = []): ClientInterface
18
-	{
18
+    {
19 19
         $options = array_merge_recursive(
20
-			[
21
-				'base_uri' => self::getEntrypoint(),
22
-				'timeout' => 2
20
+            [
21
+                'base_uri' => self::getEntrypoint(),
22
+                'timeout' => 2
23 23
             ],
24 24
             $options
25
-		);
25
+        );
26 26
 
27 27
         return new Client($options);
28
-	}
28
+    }
29 29
 
30
-	static function getEntrypoint(): string
31
-	{
32
-		return self::ENTRYPOINT.self::VERSION.'/';
33
-	}
30
+    static function getEntrypoint(): string
31
+    {
32
+        return self::ENTRYPOINT.self::VERSION.'/';
33
+    }
34 34
 }
35 35
 
Please login to merge, or discard this patch.
src/Traits/PropertyHandler.php 2 patches
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -11,48 +11,48 @@
 block discarded – undo
11 11
 
12 12
 trait PropertyHandler
13 13
 {
14
-	/**
15
-	 * @param array $data
16
-	 */
14
+    /**
15
+     * @param array $data
16
+     */
17 17
     function fillProperties(array $data): void
18
-	{
19
-		foreach ($data as $p => $v)
20
-		{
21
-			$this->fillProperty($p, $v);
22
-		}
23
-	}
18
+    {
19
+        foreach ($data as $p => $v)
20
+        {
21
+            $this->fillProperty($p, $v);
22
+        }
23
+    }
24 24
 
25
-	/**
26
-	 * @param string $property
27
-	 * @param mixed $value
28
-	 */
25
+    /**
26
+     * @param string $property
27
+     * @param mixed $value
28
+     */
29 29
     function fillProperty(string $property, $value): void
30
-	{
31
-		$property = lcfirst(str_replace('_', '', ucwords($property, '_')));
32
-		if(property_exists(__CLASS__, $property))
33
-		{
34
-			$method = sprintf('set%s', ucfirst($property));
35
-			$this->{$method}($value);
36
-		}
37
-	}
30
+    {
31
+        $property = lcfirst(str_replace('_', '', ucwords($property, '_')));
32
+        if(property_exists(__CLASS__, $property))
33
+        {
34
+            $method = sprintf('set%s', ucfirst($property));
35
+            $this->{$method}($value);
36
+        }
37
+    }
38 38
 
39
-	/**
40
-	 * @return array
41
-	 */
42
-	function getPropertyArray(): array
43
-	{
44
-		$reflection = new \ReflectionClass(__CLASS__);
45
-		$properties = $reflection->getProperties(\ReflectionProperty::IS_PROTECTED);
46
-		$data = [];
47
-		foreach($properties as $property){
48
-			$prop_name = $property->getName();
49
-			$method = sprintf('get%s', ucfirst($prop_name));
50
-			$form_name = strtolower(preg_replace('/[A-Z]/', '_$0', $prop_name));
51
-			if($reflection->hasMethod($method)){
52
-				$data[$form_name] = $this->{$method}();
53
-			}
54
-		}
55
-		return $data;
56
-	}
39
+    /**
40
+     * @return array
41
+     */
42
+    function getPropertyArray(): array
43
+    {
44
+        $reflection = new \ReflectionClass(__CLASS__);
45
+        $properties = $reflection->getProperties(\ReflectionProperty::IS_PROTECTED);
46
+        $data = [];
47
+        foreach($properties as $property){
48
+            $prop_name = $property->getName();
49
+            $method = sprintf('get%s', ucfirst($prop_name));
50
+            $form_name = strtolower(preg_replace('/[A-Z]/', '_$0', $prop_name));
51
+            if($reflection->hasMethod($method)){
52
+                $data[$form_name] = $this->{$method}();
53
+            }
54
+        }
55
+        return $data;
56
+    }
57 57
 
58 58
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
src/Traits/Client.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      * @throws BadResponseException
30 30
      * @throws ConnectException
31 31
      */
32
-    function request(string $action, $object = null, string $endpoint = null):? bool
32
+    function request(string $action, $object = null, string $endpoint = null): ? bool
33 33
     {
34 34
         /** @var SumUpClientInterface $this */
35 35
 
Please login to merge, or discard this patch.
src/Traits/ClientInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,5 +17,5 @@
 block discarded – undo
17 17
      * @param string|null $endpoint
18 18
      * @return bool|null
19 19
      */
20
-    function request(string $action, $object, string $endpoint = null):? bool;
20
+    function request(string $action, $object, string $endpoint = null): ? bool;
21 21
 }
Please login to merge, or discard this patch.