Passed
Push — master ( 1d0b8a...54ccb7 )
by mahdi
02:18
created
src/PaymentManager.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      */
124 124
     public function pay($initializeCallback = null)
125 125
     {
126
-        if($initializeCallback)
126
+        if ($initializeCallback)
127 127
             call_user_func($initializeCallback, $this->driver);
128 128
 
129 129
         return $this->driver->pay();
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         $this->validateDriver();
162 162
         $class = $this->config['map'][$this->driver];
163 163
 
164
-        return new $class($this->invoice,$this->settings);
164
+        return new $class($this->invoice, $this->settings);
165 165
     }
166 166
 
167 167
     /**
@@ -179,13 +179,13 @@  discard block
 block discarded – undo
179 179
             throw new DriverNotFoundException('Driver not found in config file. Try updating the package.');
180 180
         }
181 181
 
182
-        if (! class_exists($this->config['map'][$this->driver])) {
182
+        if (!class_exists($this->config['map'][$this->driver])) {
183 183
             throw new DriverNotFoundException('Driver source not found. Please update the package.');
184 184
         }
185 185
 
186 186
         $reflect = new \ReflectionClass($this->config['map'][$this->driver]);
187 187
 
188
-        if (! $reflect->implementsInterface(Contracts\DriverInterface::class)) {
188
+        if (!$reflect->implementsInterface(Contracts\DriverInterface::class)) {
189 189
             throw new \Exception("Driver must be an instance of Contracts\DriverInterface.");
190 190
         }
191 191
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -123,8 +123,9 @@
 block discarded – undo
123 123
      */
124 124
     public function pay($initializeCallback = null)
125 125
     {
126
-        if($initializeCallback)
127
-            call_user_func($initializeCallback, $this->driver);
126
+        if($initializeCallback) {
127
+                    call_user_func($initializeCallback, $this->driver);
128
+        }
128 129
 
129 130
         return $this->driver->pay();
130 131
     }
Please login to merge, or discard this patch.
src/Config/payment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     |
23 23
     */
24 24
     'drivers' => [
25
-        'zarinpal' => [ // set urls to https://sandbox.zarinpal.com/pg/rest/WebGate/ for using sandbox
25
+        'zarinpal' => [// set urls to https://sandbox.zarinpal.com/pg/rest/WebGate/ for using sandbox
26 26
             'apiPurchaseUrl' => 'https://www.zarinpal.com/pg/rest/WebGate/PaymentRequest.json',
27 27
             'apiPaymentUrl' => 'https://www.zarinpal.com/pg/StartPay/',
28 28
             'apiVerificationUrl' => 'https://www.zarinpal.com/pg/rest/WebGate/PaymentVerification.json',
Please login to merge, or discard this patch.
src/InvoiceBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
      */
99 99
     public function amount($amount)
100 100
     {
101
-        if (! is_int($amount)) {
101
+        if (!is_int($amount)) {
102 102
             throw new \Exception('Amount value should be an integer.');
103 103
         }
104 104
         $this->amount = $amount;
Please login to merge, or discard this patch.
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.