@@ -12,7 +12,7 @@ |
||
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 | } |
@@ -2,7 +2,7 @@ |
||
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 | { |
@@ -81,14 +81,14 @@ |
||
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 |
@@ -25,7 +25,7 @@ |
||
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 |
@@ -15,7 +15,7 @@ |
||
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 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | * @param PaymentInstrumentInterface $card |
23 | 23 | * @return bool |
24 | 24 | */ |
25 | - public function disable(PaymentInstrumentInterface $card):? bool; |
|
25 | + public function disable(PaymentInstrumentInterface $card): ? bool; |
|
26 | 26 | |
27 | 27 | /** |
28 | 28 | * @param CustomerInterface $customer |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | * @return CheckoutInterface |
14 | 14 | * @see http://docs.sumup.com/rest-api/checkouts-api/#checkouts-create-checkout-post |
15 | 15 | */ |
16 | - public function create(CheckoutInterface $checkout):? CheckoutInterface; |
|
16 | + public function create(CheckoutInterface $checkout): ? CheckoutInterface; |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * Complete a checkout |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | * @return CheckoutInterface |
23 | 23 | * @see http://docs.sumup.com/rest-api/checkouts-api/#checkouts-complete-checkout-put |
24 | 24 | */ |
25 | - public function complete(CheckoutInterface $checkout):? CheckoutInterface; |
|
25 | + public function complete(CheckoutInterface $checkout): ? CheckoutInterface; |
|
26 | 26 | |
27 | 27 | /** |
28 | 28 | * @param CheckoutInterface $checkout |
@@ -222,7 +222,7 @@ discard block |
||
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 |
||
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 |
||
260 | 260 | /** |
261 | 261 | * @return int|null |
262 | 262 | */ |
263 | - public function getRegionId():? int |
|
263 | + public function getRegionId(): ? int |
|
264 | 264 | { |
265 | 265 | return $this->regionId; |
266 | 266 | } |
@@ -279,7 +279,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -68,5 +68,5 @@ |
||
68 | 68 | /** |
69 | 69 | * @return AccessToken |
70 | 70 | */ |
71 | - public function getToken():? AccessToken; |
|
71 | + public function getToken(): ? AccessToken; |
|
72 | 72 | } |