Passed
Push — master ( c56f5e...b63130 )
by mahdi
02:51
created
src/Drivers/Sepordeh/Sepordeh.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     public function __construct(Invoice $invoice, $settings)
46 46
     {
47 47
         $this->invoice($invoice);
48
-        $this->settings = (object)$settings;
48
+        $this->settings = (object) $settings;
49 49
         $this->client = new Client();
50 50
     }
51 51
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
         $responseBody = mb_strtolower($response->getBody()->getContents());
88 88
         $body = @json_decode($responseBody, true);
89
-        $statusCode = (int)$body['status'];
89
+        $statusCode = (int) $body['status'];
90 90
 
91 91
         if ($statusCode !== 200) {
92 92
             // some error has happened
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     {
143 143
         $basePayUrl = $this->settings->mode == 'normal' ? $this->settings->apiPaymentUrl
144 144
             : $this->settings->apiDirectPaymentUrl;
145
-        $payUrl =  $basePayUrl . $this->invoice->getTransactionId();
145
+        $payUrl = $basePayUrl.$this->invoice->getTransactionId();
146 146
 
147 147
         return $this->redirectWithForm($payUrl, [], 'GET');
148 148
     }
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 
178 178
         $responseBody = mb_strtolower($response->getBody()->getContents());
179 179
         $body = @json_decode($responseBody, true);
180
-        $statusCode = (int)$body['status'];
180
+        $statusCode = (int) $body['status'];
181 181
 
182 182
         if ($statusCode !== 200) {
183 183
             $message = $body['message'] ?? $this->convertStatusCodeToMessage($statusCode);
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
      */
204 204
     private function notVerified($message, $status)
205 205
     {
206
-        throw new InvalidPaymentException($message, (int)$status);
206
+        throw new InvalidPaymentException($message, (int) $status);
207 207
     }
208 208
 
209 209
     /**
Please login to merge, or discard this patch.