Passed
Pull Request — master (#13)
by
unknown
02:10
created
src/helpers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Signature/MD5SignatureCalculator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
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,
Please login to merge, or discard this patch.
src/Signature/SHA2SignatureCalculator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
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,
Please login to merge, or discard this patch.
src/ValueObject/TransactionID.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
src/SkrillClient.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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 [];
Please login to merge, or discard this patch.
src/Request/TransferRequest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Request/SaleRequest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Request/PayoutRequest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     public function __construct(Money $amount, Description $description)
26 26
     {
27 27
         $this->payload = [
28
-            'currency' => (string)$amount->getCurrency(),
28
+            'currency' => (string) $amount->getCurrency(),
29 29
             'amount' => $this->formatToFloat($amount),
30 30
             'subject' => $description->getSubject(),
31 31
             'note' => $description->getText(),
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function setReferenceTransaction(TransactionID $transactionId): self
43 43
     {
44
-        $this->payload['frn_trn_id'] = (string)$transactionId;
44
+        $this->payload['frn_trn_id'] = (string) $transactionId;
45 45
 
46 46
         return $this;
47 47
     }
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function setOriginalTransactionId(TransactionID $transactionId): self
56 56
     {
57
-        $this->payload['transaction_id'] = (string)$transactionId;
57
+        $this->payload['transaction_id'] = (string) $transactionId;
58 58
 
59 59
         return $this;
60 60
     }
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      */
71 71
     public function setSkrillOriginalTransactionId(TransactionID $transactionId): self
72 72
     {
73
-        $this->payload['mb_transaction_id'] = (string)$transactionId;
73
+        $this->payload['mb_transaction_id'] = (string) $transactionId;
74 74
 
75 75
         return $this;
76 76
     }
Please login to merge, or discard this patch.
src/Request/Traits/AmountFormatterTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,6 +20,6 @@
 block discarded – undo
20 20
     {
21 21
         $formatter = new DecimalMoneyFormatter(new ISOCurrencies());
22 22
 
23
-        return (float)$formatter->format($money);
23
+        return (float) $formatter->format($money);
24 24
     }
25 25
 }
Please login to merge, or discard this patch.