@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | */ |
| 9 | 9 | function getSkillSupportsCountries(): array |
| 10 | 10 | { |
| 11 | - return include __DIR__ . '/../resources/iso-3166-1-alpha-3-countries-skill-supports.php'; |
|
| 11 | + return include __DIR__.'/../resources/iso-3166-1-alpha-3-countries-skill-supports.php'; |
|
| 12 | 12 | } |
| 13 | 13 | } |
| 14 | 14 | |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | */ |
| 19 | 19 | function getSkillSupportsLanguages(): array |
| 20 | 20 | { |
| 21 | - return include __DIR__ . '/../resources/iso-6391-languages-skrill-supports.php'; |
|
| 21 | + return include __DIR__.'/../resources/iso-6391-languages-skrill-supports.php'; |
|
| 22 | 22 | } |
| 23 | 23 | } |
| 24 | 24 | |
@@ -28,6 +28,6 @@ discard block |
||
| 28 | 28 | */ |
| 29 | 29 | function convertISO(): array |
| 30 | 30 | { |
| 31 | - return include __DIR__ . '/../resources/convert-iso-alpha-2-to-alpha-3.php'; |
|
| 31 | + return include __DIR__.'/../resources/convert-iso-alpha-2-to-alpha-3.php'; |
|
| 32 | 32 | } |
| 33 | 33 | } |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | return new Signature(strtoupper(md5(implode([ |
| 52 | 52 | $this->merchantId->getValue(), |
| 53 | 53 | $transactionId, |
| 54 | - strtoupper(md5((string)$this->secretWord)), |
|
| 54 | + strtoupper(md5((string) $this->secretWord)), |
|
| 55 | 55 | $this->moneyFormatter->format($amount), |
| 56 | 56 | $amount->getCurrency(), |
| 57 | 57 | $status, |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | return new Signature(strtoupper(hash('sha256', implode([ |
| 51 | 51 | $this->merchantId->getValue(), |
| 52 | 52 | $transactionId, |
| 53 | - strtoupper(hash('sha256', (string)$this->secretWord)), |
|
| 53 | + strtoupper(hash('sha256', (string) $this->secretWord)), |
|
| 54 | 54 | $this->moneyFormatter->format($amount), |
| 55 | 55 | $amount->getCurrency(), |
| 56 | 56 | $status, |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | public function __construct($value) |
| 26 | 26 | { |
| 27 | - $value = trim((string)$value); |
|
| 27 | + $value = trim((string) $value); |
|
| 28 | 28 | |
| 29 | 29 | if (empty($value)) { |
| 30 | 30 | throw InvalidTransactionIDException::emptyTransactionID(); |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | if ($this->validateAlpha($lastName)) { |
| 42 | - $this->lastName = $lastName; |
|
| 42 | + $this->lastName = $lastName; |
|
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | |
@@ -68,6 +68,6 @@ discard block |
||
| 68 | 68 | */ |
| 69 | 69 | private function validateAlpha($value): bool |
| 70 | 70 | { |
| 71 | - return (bool)preg_match('/^([a-z])+$/i', $value); |
|
| 71 | + return (bool) preg_match('/^([a-z])+$/i', $value); |
|
| 72 | 72 | } |
| 73 | 73 | } |
| 74 | 74 | \ No newline at end of file |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | */ |
| 106 | 106 | private function validateAddress($value): bool |
| 107 | 107 | { |
| 108 | - return (bool)preg_match("/^([a-z0-9\'\.\-\s\,])+$/i", $value); |
|
| 108 | + return (bool) preg_match("/^([a-z0-9\'\.\-\s\,])+$/i", $value); |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | /** |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | */ |
| 144 | 144 | private function validateAlphaNum($value): bool |
| 145 | 145 | { |
| 146 | - return (bool)preg_match('/^([a-z0-9])+$/i', $value); |
|
| 146 | + return (bool) preg_match('/^([a-z0-9])+$/i', $value); |
|
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | } |
| 150 | 150 | \ No newline at end of file |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | $this->companyName = $companyName; |
| 110 | 110 | $this->merchantEmail = $merchantEmail; |
| 111 | 111 | $this->logoUrl = $logoUrl; |
| 112 | - $this->password = md5((string)$password); |
|
| 112 | + $this->password = md5((string) $password); |
|
| 113 | 113 | $this->secretWord = $secretWord; |
| 114 | 114 | } |
| 115 | 115 | |
@@ -137,14 +137,14 @@ discard block |
||
| 137 | 137 | { |
| 138 | 138 | $params = $request->getPayload(); |
| 139 | 139 | $params['prepare_only'] = 1; // Forces only the SID to be returned without the actual page. |
| 140 | - $params['pay_to_email'] = (string)$this->merchantEmail; |
|
| 140 | + $params['pay_to_email'] = (string) $this->merchantEmail; |
|
| 141 | 141 | |
| 142 | 142 | if (null != $this->logoUrl) { |
| 143 | - $params['logo_url'] = (string)$this->logoUrl; |
|
| 143 | + $params['logo_url'] = (string) $this->logoUrl; |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | if (null != $this->companyName) { |
| 147 | - $params['recipient_description'] = (string)$this->companyName; |
|
| 147 | + $params['recipient_description'] = (string) $this->companyName; |
|
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | return SidFactory::createFromSaleResponse( |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | { |
| 162 | 162 | $params = $request->getPayload(); |
| 163 | 163 | $params['action'] = 'prepare'; |
| 164 | - $params['email'] = (string)$this->merchantEmail; |
|
| 164 | + $params['email'] = (string) $this->merchantEmail; |
|
| 165 | 165 | $params['password'] = $this->password; |
| 166 | 166 | |
| 167 | 167 | return SidFactory::createFromXMLResponse( |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | { |
| 179 | 179 | $params = $request->getPayload(); |
| 180 | 180 | $params['action'] = 'prepare'; |
| 181 | - $params['email'] = (string)$this->merchantEmail; |
|
| 181 | + $params['email'] = (string) $this->merchantEmail; |
|
| 182 | 182 | $params['password'] = $this->password; |
| 183 | 183 | |
| 184 | 184 | return SidFactory::createFromXMLResponse( |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | { |
| 196 | 196 | $params = $request->getPayload(); |
| 197 | 197 | $params['action'] = 'prepare'; |
| 198 | - $params['email'] = (string)$this->merchantEmail; |
|
| 198 | + $params['email'] = (string) $this->merchantEmail; |
|
| 199 | 199 | $params['password'] = $this->password; |
| 200 | 200 | |
| 201 | 201 | return SidFactory::createFromXMLResponse( |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | public function executeTransfer(Sid $sid): Response |
| 212 | 212 | { |
| 213 | 213 | return ResponseFactory::createFromTransferResponse( |
| 214 | - $this->request(['action' => 'transfer', 'sid' => (string)$sid], 'https://www.skrill.com/app/pay.pl') |
|
| 214 | + $this->request(['action' => 'transfer', 'sid' => (string) $sid], 'https://www.skrill.com/app/pay.pl') |
|
| 215 | 215 | ); |
| 216 | 216 | } |
| 217 | 217 | |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | public function executePayout(Sid $sid): Response |
| 224 | 224 | { |
| 225 | 225 | return ResponseFactory::createFromTransferResponse( |
| 226 | - $this->request(['action' => 'transfer', 'sid' => (string)$sid], 'https://www.skrill.com/app/pay.pl') |
|
| 226 | + $this->request(['action' => 'transfer', 'sid' => (string) $sid], 'https://www.skrill.com/app/pay.pl') |
|
| 227 | 227 | ); |
| 228 | 228 | } |
| 229 | 229 | |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | public function executeRefund(Sid $sid): Response |
| 236 | 236 | { |
| 237 | 237 | return ResponseFactory::createFromRefundResponse( |
| 238 | - $this->request(['action' => 'refund', 'sid' => (string)$sid], 'https://www.skrill.com/app/refund.pl') |
|
| 238 | + $this->request(['action' => 'refund', 'sid' => (string) $sid], 'https://www.skrill.com/app/refund.pl') |
|
| 239 | 239 | ); |
| 240 | 240 | } |
| 241 | 241 | |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | { |
| 249 | 249 | $params = $request->getPayload(); |
| 250 | 250 | $params['action'] = 'prepare'; |
| 251 | - $params['email'] = (string)$this->merchantEmail; |
|
| 251 | + $params['email'] = (string) $this->merchantEmail; |
|
| 252 | 252 | $params['password'] = $this->password; |
| 253 | 253 | |
| 254 | 254 | return SidFactory::createFromXMLResponse( |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | { |
| 266 | 266 | return ResponseFactory::createFromTransferResponse( |
| 267 | 267 | $this->request( |
| 268 | - ['action' => 'request', 'sid' => (string)$sid], |
|
| 268 | + ['action' => 'request', 'sid' => (string) $sid], |
|
| 269 | 269 | 'https://www.skrill.com/app/ondemand_request.pl' |
| 270 | 270 | ) |
| 271 | 271 | ); |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | public function viewHistory(DateTimeInterface $startDate, DateTimeInterface $endDate = null): ArrayObject |
| 280 | 280 | { |
| 281 | 281 | $params = [ |
| 282 | - 'email' => (string)$this->merchantEmail, |
|
| 282 | + 'email' => (string) $this->merchantEmail, |
|
| 283 | 283 | 'password' => $this->password, |
| 284 | 284 | 'action' => 'history', |
| 285 | 285 | 'start_date' => $startDate->format('d-m-Y'), |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | $params['end_date'] = $endDate->format('d-m-y'); |
| 290 | 290 | } |
| 291 | 291 | |
| 292 | - $tmpFile = new SplFileObject(tempnam(sys_get_temp_dir(), (string)mt_rand()), 'w+'); |
|
| 292 | + $tmpFile = new SplFileObject(tempnam(sys_get_temp_dir(), (string) mt_rand()), 'w+'); |
|
| 293 | 293 | $this->client->request( |
| 294 | 294 | 'POST', |
| 295 | 295 | 'https://www.skrill.com/app/query.pl', |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | */ |
| 338 | 338 | private function setHeaders(string $type, array $parameters): array |
| 339 | 339 | { |
| 340 | - if (method_exists( $this, "{$type}Headers")) { |
|
| 340 | + if (method_exists($this, "{$type}Headers")) { |
|
| 341 | 341 | return $this->{"{$type}Headers"}($parameters); |
| 342 | 342 | } |
| 343 | 343 | return []; |
@@ -27,8 +27,8 @@ discard block |
||
| 27 | 27 | public function __construct(Email $recipientEmail, Money $amount, Description $description) |
| 28 | 28 | { |
| 29 | 29 | $this->payload = [ |
| 30 | - 'bnf_email' => (string)$recipientEmail, |
|
| 31 | - 'currency' => (string)$amount->getCurrency(), |
|
| 30 | + 'bnf_email' => (string) $recipientEmail, |
|
| 31 | + 'currency' => (string) $amount->getCurrency(), |
|
| 32 | 32 | 'amount' => $this->formatToFloat($amount), |
| 33 | 33 | 'subject' => $description->getSubject(), |
| 34 | 34 | 'note' => $description->getText(), |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | */ |
| 45 | 45 | public function setReferenceTransaction(TransactionID $transactionId): self |
| 46 | 46 | { |
| 47 | - $this->payload['frn_trn_id'] = (string)$transactionId; |
|
| 47 | + $this->payload['frn_trn_id'] = (string) $transactionId; |
|
| 48 | 48 | |
| 49 | 49 | return $this; |
| 50 | 50 | } |
@@ -29,8 +29,8 @@ discard block |
||
| 29 | 29 | public function __construct(TransactionID $transactionId, Money $amount) |
| 30 | 30 | { |
| 31 | 31 | $this->payload = [ |
| 32 | - 'transaction_id' => (string)$transactionId, |
|
| 33 | - 'currency' => (string)$amount->getCurrency(), |
|
| 32 | + 'transaction_id' => (string) $transactionId, |
|
| 33 | + 'currency' => (string) $amount->getCurrency(), |
|
| 34 | 34 | 'amount' => $this->formatToFloat($amount), |
| 35 | 35 | ]; |
| 36 | 36 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | public function setLang(Language $lang): self |
| 44 | 44 | { |
| 45 | - $this->payload['language'] = (string)$lang; |
|
| 45 | + $this->payload['language'] = (string) $lang; |
|
| 46 | 46 | |
| 47 | 47 | return $this; |
| 48 | 48 | } |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | public function setPayFromEmail(Email $email): self |
| 56 | 56 | { |
| 57 | - $this->payload['pay_from_email'] = (string)$email; |
|
| 57 | + $this->payload['pay_from_email'] = (string) $email; |
|
| 58 | 58 | |
| 59 | 59 | return $this; |
| 60 | 60 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | public function setReturnUrl(Url $url): self |
| 90 | 90 | { |
| 91 | - $this->payload['return_url'] = (string)$url; |
|
| 91 | + $this->payload['return_url'] = (string) $url; |
|
| 92 | 92 | |
| 93 | 93 | return $this; |
| 94 | 94 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | */ |
| 101 | 101 | public function setCancelUrl(Url $url): self |
| 102 | 102 | { |
| 103 | - $this->payload['cancel_url'] = (string)$url; |
|
| 103 | + $this->payload['cancel_url'] = (string) $url; |
|
| 104 | 104 | |
| 105 | 105 | return $this; |
| 106 | 106 | } |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | */ |
| 113 | 113 | public function setStatusUrl(Url $url): self |
| 114 | 114 | { |
| 115 | - $this->payload['status_url'] = (string)$url; |
|
| 115 | + $this->payload['status_url'] = (string) $url; |
|
| 116 | 116 | |
| 117 | 117 | return $this; |
| 118 | 118 | } |
@@ -126,8 +126,8 @@ discard block |
||
| 126 | 126 | public function enableRecurringBilling(RecurringBillingNote $note, Money $money): self |
| 127 | 127 | { |
| 128 | 128 | $this->payload['ondemand_max_amount'] = $this->formatToFloat($money); |
| 129 | - $this->payload['ondemand_max_currency'] = (string)$money->getCurrency(); |
|
| 130 | - $this->payload['ondemand_note'] = (string)$note; |
|
| 129 | + $this->payload['ondemand_max_currency'] = (string) $money->getCurrency(); |
|
| 130 | + $this->payload['ondemand_note'] = (string) $note; |
|
| 131 | 131 | |
| 132 | 132 | return $this; |
| 133 | 133 | } |