Passed
Push — master ( d94137...519b06 )
by Bruce Pinheiro de
02:30
created
src/Utils/Currency.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
     const SEK = 'SEK';
13 13
     const USD = 'USD';
14 14
  
15
-    static function isValid(string $currency){
15
+    static function isValid(string $currency) {
16 16
         $currencies = self::getCurrencies();
17 17
         return in_array($currency, $currencies);
18 18
     }
Please login to merge, or discard this patch.
src/Exception/FileNotFoundException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace BPCI\SumUp\Exception;
4 4
 
5
-class FileNotFoundException extends \RuntimeException{
5
+class FileNotFoundException extends \RuntimeException {
6 6
     private $path;
7 7
     public function __construct(string $message, int $code = 0, \Exception $previous = null, string $path = null)
8 8
     {
Please login to merge, or discard this patch.
src/Context.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -81,14 +81,14 @@
 block discarded – undo
81 81
      */
82 82
     public static function loadContextFromFile(string $filePath): ContextInterface
83 83
     {
84
-        if(!file_exists($filePath)){
85
-            throw new Exception\FileNotFoundException('Context file not found: '.$filePath, 404, null, $filePath);
84
+        if (!file_exists($filePath)) {
85
+            throw new Exception\FileNotFoundException('Context file not found: ' . $filePath, 404, null, $filePath);
86 86
         }
87 87
 
88 88
         $contents = file_get_contents($filePath);
89 89
         $context_array = json_decode($contents, true);
90 90
 
91
-        if($context_array === null){
91
+        if ($context_array === null) {
92 92
             throw new Exception\MalformedJsonException('JSON sintax error.');
93 93
         }
94 94
 
Please login to merge, or discard this patch.
src/SumUp.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
 	static function getEntrypoint(): string
27 27
 	{
28
-		return self::ENTRYPOINT.self::VERSION.'/';
28
+		return self::ENTRYPOINT . self::VERSION . '/';
29 29
 	}
30 30
 }
31 31
 
Please login to merge, or discard this 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/Checkout/Checkout.php 2 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	/**
98 98
 	 * @inheritDoc
99 99
 	 */
100
-	public function getId():? string {
100
+	public function getId(): ? string {
101 101
 		return $this->id;
102 102
 	}
103 103
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 	/**
113 113
 	 * @inheritDoc
114 114
 	 */
115
-	public function getStatus():? string {
115
+	public function getStatus(): ? string {
116 116
 		return $this->status;
117 117
 	}
118 118
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 	/**
128 128
 	 * @inheritDoc
129 129
 	 */
130
-	public function getAmount():? float {
130
+	public function getAmount(): ? float {
131 131
 		return $this->amount;
132 132
 	}
133 133
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 	/**
143 143
 	 * @inheritDoc
144 144
 	 */
145
-	public function getCurrency():? string {
145
+	public function getCurrency(): ? string {
146 146
 		return $this->currency;
147 147
 	}
148 148
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	/**
158 158
 	 * @inheritDoc
159 159
 	 */
160
-	public function getPayToEmail():? string {
160
+	public function getPayToEmail(): ? string {
161 161
 		return $this->payToEmail;
162 162
 	}
163 163
 
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 	/**
173 173
 	 * @inheritDoc
174 174
 	 */
175
-	public function getCheckoutReference():? string {
175
+	public function getCheckoutReference(): ? string {
176 176
 		return $this->reference;
177 177
 	}
178 178
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 	/**
188 188
 	 * @inheritDoc
189 189
 	 */
190
-	public function getDescription():? string {
190
+	public function getDescription(): ? string {
191 191
 		return $this->description;
192 192
 	}
193 193
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 	/**
203 203
 	 * @inheritDoc
204 204
 	 */
205
-	public function getFeeAmount():? float {
205
+	public function getFeeAmount(): ? float {
206 206
 		return $this->feeAmount;
207 207
 	}
208 208
 
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 	/**
218 218
 	 * @inheritDoc
219 219
 	 */
220
-	public function getPayFromEmail():? string {
220
+	public function getPayFromEmail(): ? string {
221 221
 		return $this->payFromEmail;
222 222
 	}
223 223
 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 	/**
233 233
 	 * @inheritDoc
234 234
 	 */
235
-	public function getRedirectUrl():? string {
235
+	public function getRedirectUrl(): ? string {
236 236
 		return $this->redirectUrl;
237 237
 	}
238 238
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 		return $this;
245 245
 	}
246 246
 
247
-	function getValidUntil():? string {
247
+	function getValidUntil(): ? string {
248 248
 		return $this->validUntil;
249 249
 	}
250 250
 
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 		return $this;
254 254
 	}
255 255
 
256
-	function getTransactionCode():? string {
256
+	function getTransactionCode(): ? string {
257 257
 		return $this->transactionCode;
258 258
 	}
259 259
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 		return $this;
263 263
 	}
264 264
 
265
-	function getTransactionId():? string {
265
+	function getTransactionId(): ? string {
266 266
 		return $this->transactionId;
267 267
 	}
268 268
 
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 		return $this;
272 272
 	}
273 273
 
274
-	function getTransactions():? array {
274
+	function getTransactions(): ? array {
275 275
 //        return $this->transactions;
276 276
 		//TODO remember myself whats is it.
277 277
 		return [];
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 		return $this;
284 284
 	}
285 285
 
286
-	function getToken():? string {
286
+	function getToken(): ? string {
287 287
 		return $this->token;
288 288
 	}
289 289
 
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 	/**
367 367
 	 * @return mixed
368 368
 	 */
369
-	public function getType():? string
369
+	public function getType(): ? string
370 370
 	{
371 371
 		return $this->type;
372 372
 	}
Please login to merge, or discard this 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/Exception/NotAllowedProperty.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@
 block discarded – undo
13 13
 
14 14
 class NotAllowedProperty extends \RuntimeException
15 15
 {
16
-	public function __construct($object, $property, Throwable $previous = null)
17
-	{
18
-		$message = sprintf('Not allowed property %s into %s class!', $property,get_class($object));
19
-		parent::__construct($message, 100, $previous);
20
-	}
16
+    public function __construct($object, $property, Throwable $previous = null)
17
+    {
18
+        $message = sprintf('Not allowed property %s into %s class!', $property,get_class($object));
19
+        parent::__construct($message, 100, $previous);
20
+    }
21 21
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 {
16 16
 	public function __construct($object, $property, Throwable $previous = null)
17 17
 	{
18
-		$message = sprintf('Not allowed property %s into %s class!', $property,get_class($object));
18
+		$message = sprintf('Not allowed property %s into %s class!', $property, get_class($object));
19 19
 		parent::__construct($message, 100, $previous);
20 20
 	}
21 21
 }
Please login to merge, or discard this patch.
src/Customer/Address.php 2 patches
Indentation   +386 added lines, -386 removed lines patch added patch discarded remove patch
@@ -8,390 +8,390 @@
 block discarded – undo
8 8
  */
9 9
 class Address implements AddressInterface
10 10
 {
11
-	/**
12
-	 * First address line
13
-	 *
14
-	 * @var string $line1
15
-	 */
16
-	protected $line1;
17
-	/**
18
-	 * Second address line
19
-	 *
20
-	 * @var string
21
-	 */
22
-	protected $line2;
23
-	/**
24
-	 * Address Country
25
-	 *
26
-	 * @var string
27
-	 */
28
-	protected $country;
29
-	/**
30
-	 * Address postal code
31
-	 *
32
-	 * @var string
33
-	 */
34
-	protected $postalCode;
35
-	/**
36
-	 * Address City
37
-	 *
38
-	 * @var string
39
-	 */
40
-	protected $city;
41
-	/**
42
-	 * @var string
43
-	 */
44
-	protected $countryEnName;
45
-	/**
46
-	 * @var string
47
-	 */
48
-	protected $countryNativeName;
49
-	/**
50
-	 * @var integer
51
-	 */
52
-	protected $regionId;
53
-	/**
54
-	 * @var string
55
-	 */
56
-	protected $regionName;
57
-	/**
58
-	 * @var string
59
-	 */
60
-	protected $postCode;
61
-	/**
62
-	 * @var string
63
-	 */
64
-	protected $landline;
65
-	/**
66
-	 * @var string
67
-	 */
68
-	protected $addressLine1;
69
-	/**
70
-	 * @var string
71
-	 */
72
-	protected $addressLine2;
73
-	/**
74
-	 * Address State
75
-	 *
76
-	 * @var string
77
-	 */
78
-	protected $state;
79
-
80
-	/**
81
-	 * Address constructor.
82
-	 * @param array|null $data
83
-	 */
84
-	function __construct(?array $data = [])
85
-	{
86
-		$this->setAddressLine1($data['address_line1']??null);
87
-		$this->setAddressLine2($data['address_line2']??null);
88
-		$this->setCity($data['city']??null);
89
-		$this->setCountry($data['country']??null);
90
-		$this->setCountryEnName($data['country_en_name']??null);
91
-		$this->setCountryNativeName($data['country_native_name']??null);
92
-		$this->setRegionId($data['region_id']??null);
93
-		$this->setRegionName($data['region_name']??null);
94
-		$this->setPostCode($data['post_code']??null);
95
-		$this->setLandline($data['landline']??null);
96
-		$this->setLine1($data['line1']??null);
97
-		$this->setLine2($data['line2']??null);
98
-		$this->setPostalCode($data['postal_code']??null);
99
-		$this->setState($data['state']??null);
100
-	}
101
-
102
-	/**
103
-	 * Get $line1
104
-	 *
105
-	 * @return  string
106
-	 */
107
-	public function getLine1(): ?string
108
-	{
109
-		return $this->line1;
110
-	}
111
-
112
-	/**
113
-	 * Set $line1
114
-	 *
115
-	 * @param  string  $line1  $line1
116
-	 *
117
-	 * @return  AddressInterface
118
-	 */
119
-	public function setLine1(?string $line1): AddressInterface
120
-	{
121
-		$this->line1 = $line1;
122
-
123
-		return $this;
124
-	}
125
-
126
-	/**
127
-	 * Get second address line
128
-	 *
129
-	 * @return  string
130
-	 */
131
-	public function getLine2(): ?string
132
-	{
133
-		return $this->line2;
134
-	}
135
-
136
-	/**
137
-	 * Set second address line
138
-	 *
139
-	 * @param  string  $line2  Second address line
140
-	 *
141
-	 * @return  AddressInterface
142
-	 */
143
-	public function setLine2(?string $line2): AddressInterface
144
-	{
145
-		$this->line2 = $line2;
146
-
147
-		return $this;
148
-	}
149
-
150
-	/**
151
-	 * Get address Country
152
-	 *
153
-	 * @return  string
154
-	 */
155
-	public function getCountry(): ?string
156
-	{
157
-		return $this->country;
158
-	}
159
-
160
-	/**
161
-	 * Set address Country
162
-	 *
163
-	 * @param  string  $country  Address Country
164
-	 *
165
-	 * @return  AddressInterface
166
-	 */
167
-	public function setCountry(?string $country): AddressInterface
168
-	{
169
-		$this->country = $country;
170
-
171
-		return $this;
172
-	}
173
-
174
-	/**
175
-	 * Get address postal code
176
-	 *
177
-	 * @return  string
178
-	 */
179
-	public function getPostalCode(): ?string
180
-	{
181
-		return $this->postalCode;
182
-	}
183
-
184
-	/**
185
-	 * Set address postal code
186
-	 *
187
-	 * @param  string  $postalCode  Address postal code
188
-	 *
189
-	 * @return  AddressInterface
190
-	 */
191
-	public function setPostalCode(?string $postalCode): AddressInterface
192
-	{
193
-		$this->postalCode = $postalCode;
194
-
195
-		return $this;
196
-	}
197
-
198
-	/**
199
-	 * Get address City
200
-	 *
201
-	 * @return  string
202
-	 */
203
-	public function getCity(): ?string
204
-	{
205
-		return $this->city;
206
-	}
207
-
208
-	/**
209
-	 * Set address City
210
-	 *
211
-	 * @param  string  $city  Address City
212
-	 *
213
-	 * @return  AddressInterface
214
-	 */
215
-	public function setCity(?string $city): AddressInterface
216
-	{
217
-		$this->city = $city;
218
-
219
-		return $this;
220
-	}
221
-
222
-	/**
223
-	 * @return mixed
224
-	 */
225
-	public function getCountryEnName():? string
226
-	{
227
-		return $this->countryEnName;
228
-	}
229
-
230
-	/**
231
-	 * @param mixed $countryEnName
232
-	 * @return AddressInterface
233
-	 */
234
-	public function setCountryEnName($countryEnName): AddressInterface
235
-	{
236
-		$this->countryEnName = $countryEnName;
237
-
238
-		return $this;
239
-	}
240
-
241
-	/**
242
-	 * @return mixed
243
-	 */
244
-	public function getCountryNativeName():? string
245
-	{
246
-		return $this->countryNativeName;
247
-	}
248
-
249
-	/**
250
-	 * @param mixed $countryNativeName
251
-	 * @return Address
252
-	 */
253
-	public function setCountryNativeName(?string $countryNativeName): AddressInterface
254
-	{
255
-		$this->countryNativeName = $countryNativeName;
256
-
257
-		return $this;
258
-	}
259
-
260
-	/**
261
-	 * @return number|null
262
-	 */
263
-	public function getRegionId():? number
264
-	{
265
-		return $this->regionId;
266
-	}
267
-
268
-	/**
269
-	 * @param number|null $regionId
270
-	 * @return Address
271
-	 */
272
-	public function setRegionId(?number $regionId): AddressInterface
273
-	{
274
-		$this->regionId = $regionId;
275
-
276
-		return $this;
277
-	}
278
-
279
-	/**
280
-	 * @return string|null
281
-	 */
282
-	public function getRegionName():? string
283
-	{
284
-		return $this->regionName;
285
-	}
286
-
287
-	/**
288
-	 * @param string|null $regionName
289
-	 * @return AddressInterface
290
-	 */
291
-	public function setRegionName(?string $regionName): AddressInterface
292
-	{
293
-		$this->regionName = $regionName;
294
-
295
-		return $this;
296
-	}
297
-
298
-	/**
299
-	 * @return string|null
300
-	 */
301
-	public function getPostCode():? string
302
-	{
303
-		return $this->postCode;
304
-	}
305
-
306
-	/**
307
-	 * @param string|null $postCode
308
-	 * @return AddressInterface
309
-	 */
310
-	public function setPostCode(?string $postCode): AddressInterface
311
-	{
312
-		$this->postCode = $postCode;
313
-
314
-		return $this;
315
-	}
316
-
317
-	/**
318
-	 * @return string|null
319
-	 */
320
-	public function getLandline():? string
321
-	{
322
-		return $this->landline;
323
-	}
324
-
325
-	/**
326
-	 * @param string|null $landline
327
-	 * @return AddressInterface
328
-	 */
329
-	public function setLandline(?string $landline): AddressInterface
330
-	{
331
-		$this->landline = $landline;
332
-
333
-		return $this;
334
-	}
335
-
336
-	/**
337
-	 * @return string|null
338
-	 */
339
-	public function getAddressLine1():? string
340
-	{
341
-		return $this->addressLine1;
342
-	}
343
-
344
-	/**
345
-	 * @param string|null $addressLine1
346
-	 * @return AddressInterface
347
-	 */
348
-	public function setAddressLine1(?string $addressLine1): AddressInterface
349
-	{
350
-		$this->addressLine1 = $addressLine1;
351
-
352
-		return $this;
353
-	}
354
-
355
-	/**
356
-	 * @return string|null
357
-	 */
358
-	public function getAddressLine2():? string
359
-	{
360
-		return $this->addressLine2;
361
-	}
362
-
363
-	/**
364
-	 * @param string|null $addressLine2
365
-	 * @return AddressInterface
366
-	 */
367
-	public function setAddressLine2(?string $addressLine2): AddressInterface
368
-	{
369
-		$this->addressLine2 = $addressLine2;
370
-
371
-		return $this;
372
-	}
373
-
374
-	/**
375
-	 * Get address State
376
-	 *
377
-	 * @return  string|null
378
-	 */
379
-	public function getState(): ?string
380
-	{
381
-		return $this->state;
382
-	}
383
-
384
-	/**
385
-	 * Set address State
386
-	 *
387
-	 * @param  string|null  $state  Address State
388
-	 *
389
-	 * @return  AddressInterface
390
-	 */
391
-	public function setState(?string $state): AddressInterface
392
-	{
393
-		$this->state = $state;
394
-
395
-		return $this;
396
-	}
11
+    /**
12
+     * First address line
13
+     *
14
+     * @var string $line1
15
+     */
16
+    protected $line1;
17
+    /**
18
+     * Second address line
19
+     *
20
+     * @var string
21
+     */
22
+    protected $line2;
23
+    /**
24
+     * Address Country
25
+     *
26
+     * @var string
27
+     */
28
+    protected $country;
29
+    /**
30
+     * Address postal code
31
+     *
32
+     * @var string
33
+     */
34
+    protected $postalCode;
35
+    /**
36
+     * Address City
37
+     *
38
+     * @var string
39
+     */
40
+    protected $city;
41
+    /**
42
+     * @var string
43
+     */
44
+    protected $countryEnName;
45
+    /**
46
+     * @var string
47
+     */
48
+    protected $countryNativeName;
49
+    /**
50
+     * @var integer
51
+     */
52
+    protected $regionId;
53
+    /**
54
+     * @var string
55
+     */
56
+    protected $regionName;
57
+    /**
58
+     * @var string
59
+     */
60
+    protected $postCode;
61
+    /**
62
+     * @var string
63
+     */
64
+    protected $landline;
65
+    /**
66
+     * @var string
67
+     */
68
+    protected $addressLine1;
69
+    /**
70
+     * @var string
71
+     */
72
+    protected $addressLine2;
73
+    /**
74
+     * Address State
75
+     *
76
+     * @var string
77
+     */
78
+    protected $state;
79
+
80
+    /**
81
+     * Address constructor.
82
+     * @param array|null $data
83
+     */
84
+    function __construct(?array $data = [])
85
+    {
86
+        $this->setAddressLine1($data['address_line1']??null);
87
+        $this->setAddressLine2($data['address_line2']??null);
88
+        $this->setCity($data['city']??null);
89
+        $this->setCountry($data['country']??null);
90
+        $this->setCountryEnName($data['country_en_name']??null);
91
+        $this->setCountryNativeName($data['country_native_name']??null);
92
+        $this->setRegionId($data['region_id']??null);
93
+        $this->setRegionName($data['region_name']??null);
94
+        $this->setPostCode($data['post_code']??null);
95
+        $this->setLandline($data['landline']??null);
96
+        $this->setLine1($data['line1']??null);
97
+        $this->setLine2($data['line2']??null);
98
+        $this->setPostalCode($data['postal_code']??null);
99
+        $this->setState($data['state']??null);
100
+    }
101
+
102
+    /**
103
+     * Get $line1
104
+     *
105
+     * @return  string
106
+     */
107
+    public function getLine1(): ?string
108
+    {
109
+        return $this->line1;
110
+    }
111
+
112
+    /**
113
+     * Set $line1
114
+     *
115
+     * @param  string  $line1  $line1
116
+     *
117
+     * @return  AddressInterface
118
+     */
119
+    public function setLine1(?string $line1): AddressInterface
120
+    {
121
+        $this->line1 = $line1;
122
+
123
+        return $this;
124
+    }
125
+
126
+    /**
127
+     * Get second address line
128
+     *
129
+     * @return  string
130
+     */
131
+    public function getLine2(): ?string
132
+    {
133
+        return $this->line2;
134
+    }
135
+
136
+    /**
137
+     * Set second address line
138
+     *
139
+     * @param  string  $line2  Second address line
140
+     *
141
+     * @return  AddressInterface
142
+     */
143
+    public function setLine2(?string $line2): AddressInterface
144
+    {
145
+        $this->line2 = $line2;
146
+
147
+        return $this;
148
+    }
149
+
150
+    /**
151
+     * Get address Country
152
+     *
153
+     * @return  string
154
+     */
155
+    public function getCountry(): ?string
156
+    {
157
+        return $this->country;
158
+    }
159
+
160
+    /**
161
+     * Set address Country
162
+     *
163
+     * @param  string  $country  Address Country
164
+     *
165
+     * @return  AddressInterface
166
+     */
167
+    public function setCountry(?string $country): AddressInterface
168
+    {
169
+        $this->country = $country;
170
+
171
+        return $this;
172
+    }
173
+
174
+    /**
175
+     * Get address postal code
176
+     *
177
+     * @return  string
178
+     */
179
+    public function getPostalCode(): ?string
180
+    {
181
+        return $this->postalCode;
182
+    }
183
+
184
+    /**
185
+     * Set address postal code
186
+     *
187
+     * @param  string  $postalCode  Address postal code
188
+     *
189
+     * @return  AddressInterface
190
+     */
191
+    public function setPostalCode(?string $postalCode): AddressInterface
192
+    {
193
+        $this->postalCode = $postalCode;
194
+
195
+        return $this;
196
+    }
197
+
198
+    /**
199
+     * Get address City
200
+     *
201
+     * @return  string
202
+     */
203
+    public function getCity(): ?string
204
+    {
205
+        return $this->city;
206
+    }
207
+
208
+    /**
209
+     * Set address City
210
+     *
211
+     * @param  string  $city  Address City
212
+     *
213
+     * @return  AddressInterface
214
+     */
215
+    public function setCity(?string $city): AddressInterface
216
+    {
217
+        $this->city = $city;
218
+
219
+        return $this;
220
+    }
221
+
222
+    /**
223
+     * @return mixed
224
+     */
225
+    public function getCountryEnName():? string
226
+    {
227
+        return $this->countryEnName;
228
+    }
229
+
230
+    /**
231
+     * @param mixed $countryEnName
232
+     * @return AddressInterface
233
+     */
234
+    public function setCountryEnName($countryEnName): AddressInterface
235
+    {
236
+        $this->countryEnName = $countryEnName;
237
+
238
+        return $this;
239
+    }
240
+
241
+    /**
242
+     * @return mixed
243
+     */
244
+    public function getCountryNativeName():? string
245
+    {
246
+        return $this->countryNativeName;
247
+    }
248
+
249
+    /**
250
+     * @param mixed $countryNativeName
251
+     * @return Address
252
+     */
253
+    public function setCountryNativeName(?string $countryNativeName): AddressInterface
254
+    {
255
+        $this->countryNativeName = $countryNativeName;
256
+
257
+        return $this;
258
+    }
259
+
260
+    /**
261
+     * @return number|null
262
+     */
263
+    public function getRegionId():? number
264
+    {
265
+        return $this->regionId;
266
+    }
267
+
268
+    /**
269
+     * @param number|null $regionId
270
+     * @return Address
271
+     */
272
+    public function setRegionId(?number $regionId): AddressInterface
273
+    {
274
+        $this->regionId = $regionId;
275
+
276
+        return $this;
277
+    }
278
+
279
+    /**
280
+     * @return string|null
281
+     */
282
+    public function getRegionName():? string
283
+    {
284
+        return $this->regionName;
285
+    }
286
+
287
+    /**
288
+     * @param string|null $regionName
289
+     * @return AddressInterface
290
+     */
291
+    public function setRegionName(?string $regionName): AddressInterface
292
+    {
293
+        $this->regionName = $regionName;
294
+
295
+        return $this;
296
+    }
297
+
298
+    /**
299
+     * @return string|null
300
+     */
301
+    public function getPostCode():? string
302
+    {
303
+        return $this->postCode;
304
+    }
305
+
306
+    /**
307
+     * @param string|null $postCode
308
+     * @return AddressInterface
309
+     */
310
+    public function setPostCode(?string $postCode): AddressInterface
311
+    {
312
+        $this->postCode = $postCode;
313
+
314
+        return $this;
315
+    }
316
+
317
+    /**
318
+     * @return string|null
319
+     */
320
+    public function getLandline():? string
321
+    {
322
+        return $this->landline;
323
+    }
324
+
325
+    /**
326
+     * @param string|null $landline
327
+     * @return AddressInterface
328
+     */
329
+    public function setLandline(?string $landline): AddressInterface
330
+    {
331
+        $this->landline = $landline;
332
+
333
+        return $this;
334
+    }
335
+
336
+    /**
337
+     * @return string|null
338
+     */
339
+    public function getAddressLine1():? string
340
+    {
341
+        return $this->addressLine1;
342
+    }
343
+
344
+    /**
345
+     * @param string|null $addressLine1
346
+     * @return AddressInterface
347
+     */
348
+    public function setAddressLine1(?string $addressLine1): AddressInterface
349
+    {
350
+        $this->addressLine1 = $addressLine1;
351
+
352
+        return $this;
353
+    }
354
+
355
+    /**
356
+     * @return string|null
357
+     */
358
+    public function getAddressLine2():? string
359
+    {
360
+        return $this->addressLine2;
361
+    }
362
+
363
+    /**
364
+     * @param string|null $addressLine2
365
+     * @return AddressInterface
366
+     */
367
+    public function setAddressLine2(?string $addressLine2): AddressInterface
368
+    {
369
+        $this->addressLine2 = $addressLine2;
370
+
371
+        return $this;
372
+    }
373
+
374
+    /**
375
+     * Get address State
376
+     *
377
+     * @return  string|null
378
+     */
379
+    public function getState(): ?string
380
+    {
381
+        return $this->state;
382
+    }
383
+
384
+    /**
385
+     * Set address State
386
+     *
387
+     * @param  string|null  $state  Address State
388
+     *
389
+     * @return  AddressInterface
390
+     */
391
+    public function setState(?string $state): AddressInterface
392
+    {
393
+        $this->state = $state;
394
+
395
+        return $this;
396
+    }
397 397
 }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 	/**
223 223
 	 * @return mixed
224 224
 	 */
225
-	public function getCountryEnName():? string
225
+	public function getCountryEnName(): ? string
226 226
 	{
227 227
 		return $this->countryEnName;
228 228
 	}
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 	/**
242 242
 	 * @return mixed
243 243
 	 */
244
-	public function getCountryNativeName():? string
244
+	public function getCountryNativeName(): ? string
245 245
 	{
246 246
 		return $this->countryNativeName;
247 247
 	}
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 	/**
261 261
 	 * @return number|null
262 262
 	 */
263
-	public function getRegionId():? number
263
+	public function getRegionId(): ? number
264 264
 	{
265 265
 		return $this->regionId;
266 266
 	}
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 	/**
280 280
 	 * @return string|null
281 281
 	 */
282
-	public function getRegionName():? string
282
+	public function getRegionName(): ? string
283 283
 	{
284 284
 		return $this->regionName;
285 285
 	}
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 	/**
299 299
 	 * @return string|null
300 300
 	 */
301
-	public function getPostCode():? string
301
+	public function getPostCode(): ? string
302 302
 	{
303 303
 		return $this->postCode;
304 304
 	}
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 	/**
318 318
 	 * @return string|null
319 319
 	 */
320
-	public function getLandline():? string
320
+	public function getLandline(): ? string
321 321
 	{
322 322
 		return $this->landline;
323 323
 	}
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 	/**
337 337
 	 * @return string|null
338 338
 	 */
339
-	public function getAddressLine1():? string
339
+	public function getAddressLine1(): ? string
340 340
 	{
341 341
 		return $this->addressLine1;
342 342
 	}
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
 	/**
356 356
 	 * @return string|null
357 357
 	 */
358
-	public function getAddressLine2():? string
358
+	public function getAddressLine2(): ? string
359 359
 	{
360 360
 		return $this->addressLine2;
361 361
 	}
Please login to merge, or discard this patch.
src/SumUpClientInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,5 +68,5 @@
 block discarded – undo
68 68
     /**
69 69
      * @return AccessToken
70 70
      */
71
-    function getToken():? AccessToken;
71
+    function getToken(): ? AccessToken;
72 72
 }
Please login to merge, or discard this patch.
src/OAuth/AccessToken.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,12 +20,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.