Passed
Push — master ( bf4170...0f228a )
by mahdi
02:32
created
src/Drivers/Azki/Azki.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     public function __construct(Invoice $invoice, $settings)
65 65
     {
66 66
         $this->invoice($invoice);
67
-        $this->settings = (object)$settings;
67
+        $this->settings = (object) $settings;
68 68
         $this->client   = new Client();
69 69
         $this->convertAmountItems();
70 70
     }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         if (empty($details['phone']) && empty($details['mobile'])) {
78 78
             throw new PurchaseFailedException('Phone number is required');
79 79
         }
80
-        if (!isset($details['items']) ||  count($details['items']) == 0) {
80
+        if (!isset($details['items']) || count($details['items']) == 0) {
81 81
             throw new PurchaseFailedException('Items is required for this driver');
82 82
         }
83 83
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
                 ? $this->settings->fallbackUrl
89 89
                 : $callback;
90 90
         $sub_url     = self::subUrls['purchase'];
91
-        $url         = $this->settings->apiPaymentUrl . $sub_url;
91
+        $url         = $this->settings->apiPaymentUrl.$sub_url;
92 92
 
93 93
         $signature = $this->makeSignature(
94 94
             $sub_url,
@@ -180,8 +180,8 @@  discard block
 block discarded – undo
180 180
          */
181 181
 
182 182
         $new_items = array_map(
183
-            function ($item) {
184
-                $item['amount'] *= 10;  // convert toman to rial
183
+            function($item) {
184
+                $item['amount'] *= 10; // convert toman to rial
185 185
                 return $item;
186 186
             },
187 187
             $this->invoice->getDetails()['items'] ?? []
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
     private function getPaymentStatus()
267 267
     {
268 268
         $sub_url = self::subUrls['paymentStatus'];
269
-        $url     = $this->settings->apiPaymentUrl . $sub_url;
269
+        $url     = $this->settings->apiPaymentUrl.$sub_url;
270 270
 
271 271
         $signature = $this->makeSignature(
272 272
             $sub_url,
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
         ];
304 304
 
305 305
         if (array_key_exists($status, $translations)) {
306
-            throw new PurchaseFailedException("تراکنش در وضعیت " . $translations[$status] . " است.");
306
+            throw new PurchaseFailedException("تراکنش در وضعیت ".$translations[$status]." است.");
307 307
         } else {
308 308
             throw new PurchaseFailedException('خطای ناشناخته ای رخ داده است.');
309 309
         }
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
     private function VerifyTransaction()
327 327
     {
328 328
         $sub_url = self::subUrls['verify'];
329
-        $url     = $this->settings->apiPaymentUrl . $sub_url;
329
+        $url     = $this->settings->apiPaymentUrl.$sub_url;
330 330
 
331 331
         $signature = $this->makeSignature(
332 332
             $sub_url,
Please login to merge, or discard this patch.