Passed
Pull Request — master (#266)
by
unknown
02:45
created
src/Drivers/Pna/Pna.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     public function __construct(Invoice $invoice, $settings)
47 47
     {
48 48
         $this->invoice($invoice);
49
-        $this->settings = (object)$settings;
49
+        $this->settings = (object) $settings;
50 50
         $this->client = new Client();
51 51
     }
52 52
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         $data = [
69 69
             "CorporationPin" => $this->settings->CorporationPin,
70 70
             "Amount" => $amount,
71
-            "OrderId" => intval(1, time()) . crc32($this->invoice->getUuid()),
71
+            "OrderId" => intval(1, time()).crc32($this->invoice->getUuid()),
72 72
             "CallBackUrl" => $this->settings->callbackUrl,
73 73
             "AdditionalData" => $description,
74 74
         ];
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         if (isset($result['errors'])) {
91 91
             throw new PurchaseFailedException($result['title'] ?? 'اطلاعات وارد شده اشتباه می باشد.', $result['status'] ?? 400);
92 92
         }
93
-        if (!isset($result['status']) || (string)$result['status'] !== '0') {
93
+        if (!isset($result['status']) || (string) $result['status'] !== '0') {
94 94
             throw new PurchaseFailedException($result['message'] ?? "خطای ناشناخته رخ داده است. در صورت کسر مبلغ از حساب حداکثر پس از 72 ساعت به حسابتان برمیگردد", $result['status'] ?? 400);
95 95
         }
96 96
         $this->invoice->transactionId($result['token']);
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         $transactionId = $this->invoice->getTransactionId();
109 109
         $paymentUrl = $this->settings->apiPaymentUrl;
110 110
 
111
-        $payUrl = $paymentUrl . $transactionId;
111
+        $payUrl = $paymentUrl.$transactionId;
112 112
 
113 113
         return $this->redirectWithForm($payUrl, [], 'GET');
114 114
     }
@@ -138,9 +138,9 @@  discard block
 block discarded – undo
138 138
         );
139 139
         $result = json_decode($response->getBody()->getContents(), true);
140 140
         if (!isset($result['status'])
141
-            || ((string)$result['status'] !== '0'
142
-                && (string)$result['status'] !== '2')
143
-            || (string)$result['rrn'] === '0') {
141
+            || ((string) $result['status'] !== '0'
142
+                && (string) $result['status'] !== '2')
143
+            || (string) $result['rrn'] === '0') {
144 144
             throw new InvalidPaymentException("خطای ناشناخته رخ داده است. در صورت کسر مبلغ از حساب حداکثر پس از 72 ساعت به حسابتان برمیگردد", $result['status'] ?? 400);
145 145
         }
146 146
         $refId = $result['rrn'];
Please login to merge, or discard this patch.
src/Drivers/Shepa/Shepa.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      */
111 111
     public function pay(): RedirectionForm
112 112
     {
113
-        $payUrl = $this->getPaymentUrl() . $this->invoice->getTransactionId();
113
+        $payUrl = $this->getPaymentUrl().$this->invoice->getTransactionId();
114 114
 
115 115
         return $this->redirectWithForm($payUrl, [], 'GET');
116 116
     }
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         }
160 160
 
161 161
         $refId = $body['result']['refid'];
162
-        $receipt =  $this->createReceipt($refId);
162
+        $receipt = $this->createReceipt($refId);
163 163
 
164 164
         $receipt->detail([
165 165
             'refid' => $refId,
Please login to merge, or discard this patch.
src/Drivers/IranDargah/IranDargah.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      */
107 107
     public function pay(): RedirectionForm
108 108
     {
109
-        $payUrl = $this->getPaymentUrl() . $this->invoice->getTransactionId();
109
+        $payUrl = $this->getPaymentUrl().$this->invoice->getTransactionId();
110 110
 
111 111
         return $this->redirectWithForm($payUrl, [], 'GET');
112 112
     }
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         }
153 153
 
154 154
         $refId = $body['refId'];
155
-        $receipt =  $this->createReceipt($refId);
155
+        $receipt = $this->createReceipt($refId);
156 156
 
157 157
         $receipt->detail([
158 158
             'message' => $body['message'],
Please login to merge, or discard this patch.
src/Drivers/Sepehr/Sepehr.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         $mobile = '';
56 56
         //set CellNumber for get user cards
57 57
         if (!empty($this->invoice->getDetails()['mobile'])) {
58
-            $mobile = '&CellNumber=' . $this->invoice->getDetails()['mobile'];
58
+            $mobile = '&CellNumber='.$this->invoice->getDetails()['mobile'];
59 59
         }
60 60
 
61 61
         $invoiceID = $this->test_input($this->invoice->getUuid());
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             $this->notVerified($responseCode);
118 118
         }
119 119
 
120
-        $data_query = 'digitalreceipt=' . Request::input('digitalreceipt') . '&Tid=' . $this->settings->terminalId;
120
+        $data_query = 'digitalreceipt='.Request::input('digitalreceipt').'&Tid='.$this->settings->terminalId;
121 121
         $advice_array = $this->makeHttpChargeRequest('POST', $data_query, $this->settings->apiVerificationUrl);
122 122
         $decode_advice_array = json_decode($advice_array);
123 123
 
@@ -193,9 +193,9 @@  discard block
 block discarded – undo
193 193
         );
194 194
 
195 195
         if (array_key_exists($status, $translations)) {
196
-            throw new InvalidPaymentException($translations[$status], (int)$status);
196
+            throw new InvalidPaymentException($translations[$status], (int) $status);
197 197
         } else {
198
-            throw new InvalidPaymentException('خطای ناشناخته ای رخ داده است.', (int)$status);
198
+            throw new InvalidPaymentException('خطای ناشناخته ای رخ داده است.', (int) $status);
199 199
         }
200 200
     }
201 201
 
Please login to merge, or discard this patch.