Passed
Pull Request — master (#72)
by
unknown
03:01 queued 19s
created
src/Provider/PaymentServiceProvider.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
          * Bind to service container.
26 26
          */
27
-        $this->app->bind('shetabit-payment', function () {
27
+        $this->app->bind('shetabit-payment', function() {
28 28
             return new PaymentManager(config('payment'));
29 29
         });
30 30
     }
Please login to merge, or discard this patch.
src/Drivers/Behpardakht/Behpardakht.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
         $soap = new \SoapClient($this->settings->apiVerificationUrl);
112 112
 
113 113
         // step1: verify request
114
-        $verifyResponse = (int)$soap->bpVerifyRequest($data, $this->settings->apiNamespaceUrl)->return;
114
+        $verifyResponse = (int) $soap->bpVerifyRequest($data, $this->settings->apiNamespaceUrl)->return;
115 115
         if ($verifyResponse != 0) {
116 116
             // rollback money and throw exception
117 117
             $soap->bpReversalRequest($data, $this->settings->apiNamespaceUrl);
Please login to merge, or discard this patch.
src/Drivers/Pasargad/Pasargad.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -253,20 +253,20 @@
 block discarded – undo
253 253
         $hash_stack = array();
254 254
         foreach ($values as $key => $val) {
255 255
             switch ($val['type']) {
256
-             case 'open':
256
+                case 'open':
257 257
                 array_push($hash_stack, $val['tag']);
258
-             break;
259
-             case 'close':
258
+                break;
259
+                case 'close':
260 260
                 array_pop($hash_stack);
261
-             break;
262
-             case 'complete':
261
+                break;
262
+                case 'complete':
263 263
                 array_push($hash_stack, $val['tag']);
264 264
                 // uncomment to see what this function is doing
265 265
                 // echo("\$ret[" . implode($hash_stack, "][") . "] = '{$val[value]}';\n");
266 266
                 eval("\$ret[" . implode($hash_stack, "][") . "] = '{$val[value]}';");
267 267
                 array_pop($hash_stack);
268
-             break;
269
-          }
268
+                break;
269
+            }
270 270
         }
271 271
 
272 272
         return $ret;
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
      */
202 202
     protected function prepareInvoiceData()
203 203
     {
204
-        $action = "1003"; 	// 1003 : for buy request (bank standard)
204
+        $action = "1003"; // 1003 : for buy request (bank standard)
205 205
         $merchantCode = $this->settings->merchantId;
206 206
         $terminalCode = $this->settings->terminalCode;
207 207
         $amount = $this->invoice->getAmount() * 10; // convert to toman
@@ -215,10 +215,10 @@  discard block
 block discarded – undo
215 215
             $invoiceDate = date("Y/m/d H:i:s");
216 216
         }
217 217
 
218
-        $data = "#". $merchantCode ."#". $terminalCode ."#". $invoiceNumber ."#". $invoiceDate ."#". $amount ."#". $redirectAddress ."#". $action ."#". $timeStamp ."#";
218
+        $data = "#".$merchantCode."#".$terminalCode."#".$invoiceNumber."#".$invoiceDate."#".$amount."#".$redirectAddress."#".$action."#".$timeStamp."#";
219 219
         $data = sha1($data, true);
220
-        $data =  $this->sign($data);
221
-        $signedData =  base64_encode($data);
220
+        $data = $this->sign($data);
221
+        $signedData = base64_encode($data);
222 222
 
223 223
         return [
224 224
             'invoiceNumber' => $invoiceNumber,
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
                 array_push($hash_stack, $val['tag']);
264 264
                 // uncomment to see what this function is doing
265 265
                 // echo("\$ret[" . implode($hash_stack, "][") . "] = '{$val[value]}';\n");
266
-                eval("\$ret[" . implode($hash_stack, "][") . "] = '{$val[value]}';");
266
+                eval("\$ret[".implode($hash_stack, "][")."] = '{$val[value]}';");
267 267
                 array_pop($hash_stack);
268 268
              break;
269 269
           }
Please login to merge, or discard this patch.
src/Drivers/Pasargad/Utils/RSA.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             $padding = str_repeat("\xFF", $pad_length);
108 108
         }
109 109
 
110
-        return "\x00" . $block_type . $padding . "\x00" . $data;
110
+        return "\x00".$block_type.$padding."\x00".$data;
111 111
     }
112 112
 
113 113
     private function remove_PKCS1_padding($data, $blocksize)
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         while ($div > 0) {
160 160
             $mod = bcmod($div, $base);
161 161
             $div = bcdiv($div, $base);
162
-            $result = chr($mod) . $result;
162
+            $result = chr($mod).$result;
163 163
         }
164 164
 
165 165
         return str_pad($result, $blocksize, "\x00", STR_PAD_LEFT);
Please login to merge, or discard this patch.