Passed
Branch master (984800)
by Stanley
04:12
created
Category
src/MpesaApiClient.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -156,10 +156,10 @@
 block discarded – undo
156 156
      * @return mixed
157 157
      * @throws MpesaApiRequestException
158 158
      */
159
-    protected function call($url, $options = [], $method = 'POST')
159
+    protected function call($url, $options = [ ], $method = 'POST')
160 160
     {
161 161
         if (isset($this->accessToken)) {
162
-            $options['headers'] = ['Authorization' => 'Bearer ' . $this->accessToken];
162
+            $options[ 'headers' ] = [ 'Authorization' => 'Bearer ' . $this->accessToken ];
163 163
         }
164 164
 
165 165
         try {
Please login to merge, or discard this patch.
src/Requests/B2B.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         $this->initiatorName = config('laravel-daraja.initiator.name');
82 82
         $this->securityCredential = $this->securityCredential(config('laravel-daraja.initiator.credential'));
83 83
         $this->partyA = config('laravel-daraja.initiator.short_code');
84
-        $this->senderIdentifierType = $this->identifier[config('laravel-daraja.initiator.type')];
84
+        $this->senderIdentifierType = $this->identifier[ config('laravel-daraja.initiator.type') ];
85 85
 
86 86
         $this->queueTimeOutURL = $this->setUrl(config('laravel-daraja.queue_timeout_url.b2b'));
87 87
         $this->resultURL = $this->setUrl(config('laravel-daraja.result_url.b2b'));
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     public function setShortCode($code, $type)
118 118
     {
119 119
         $this->partyA = $code;
120
-        $this->senderIdentifierType = $this->identifier[$type];
120
+        $this->senderIdentifierType = $this->identifier[ $type ];
121 121
     }
122 122
 
123 123
     /**
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
     public function payToPayBill($payBillNo, $amount, $remarks, $accountReference = '')
155 155
     {
156 156
         $this->setCommandId('BusinessPayBill');
157
-        $this->receiverIdentifierType = $this->identifier['paybill'];
157
+        $this->receiverIdentifierType = $this->identifier[ 'paybill' ];
158 158
         return $this->pay($payBillNo, $amount, $remarks, $accountReference);
159 159
     }
160 160
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
     public function payToBuyGoods($tillNo, $amount, $remarks)
171 171
     {
172 172
         $this->setCommandId('BusinessBuyGoods');
173
-        $this->receiverIdentifierType = $this->identifier['till'];
173
+        $this->receiverIdentifierType = $this->identifier[ 'till' ];
174 174
         return $this->pay($tillNo, $amount, $remarks);
175 175
     }
176 176
 
@@ -204,6 +204,6 @@  discard block
 block discarded – undo
204 204
             "ResultURL" => $this->resultURL
205 205
         ];
206 206
 
207
-        return $response = $this->call($this->endPoint, ['json' => $parameters]);
207
+        return $response = $this->call($this->endPoint, [ 'json' => $parameters ]);
208 208
     }
209 209
 }
210 210
\ No newline at end of file
Please login to merge, or discard this patch.
src/Requests/Reversal.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@
 block discarded – undo
116 116
             "Occasion" => str_limit($occasion, 100, '')
117 117
         ];
118 118
 
119
-        return $this->call($this->reversalEndPoint, ['json' => $parameters]);
119
+        return $this->call($this->reversalEndPoint, [ 'json' => $parameters ]);
120 120
     }
121 121
 
122 122
 }
123 123
\ No newline at end of file
Please login to merge, or discard this patch.
src/Requests/STK.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
             "TransactionDesc" => str_limit($description, 20, '')
130 130
         ];
131 131
 
132
-        return $this->call($this->stkEndpoint, ['json' => $parameters]);
132
+        return $this->call($this->stkEndpoint, [ 'json' => $parameters ]);
133 133
     }
134 134
 
135 135
     /**
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             "CheckoutRequestID" => $checkoutRequestId
151 151
         ];
152 152
 
153
-        return $this->call($this->statusEndPoint, ['json' => $parameters]);
153
+        return $this->call($this->statusEndPoint, [ 'json' => $parameters ]);
154 154
     }
155 155
 
156 156
 }
157 157
\ No newline at end of file
Please login to merge, or discard this patch.
src/Requests/Transaction.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      */
107 107
     public function toPayBillStatus($transactionID, $remarks, $occasion = '')
108 108
     {
109
-        $this->identifierType = $this->identifier['paybill'];
109
+        $this->identifierType = $this->identifier[ 'paybill' ];
110 110
         return $this->status($transactionID, $remarks, $occasion);
111 111
     }
112 112
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      */
121 121
     public function toTillStatus($transactionID, $remarks, $occasion = '')
122 122
     {
123
-        $this->identifierType = $this->identifier['till'];
123
+        $this->identifierType = $this->identifier[ 'till' ];
124 124
         return $this->status($transactionID, $remarks, $occasion);
125 125
     }
126 126
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      */
135 135
     public function toMsisdnStatus($transactionID, $remarks, $occasion = '')
136 136
     {
137
-        $this->identifierType = $this->identifier['msisdn'];
137
+        $this->identifierType = $this->identifier[ 'msisdn' ];
138 138
         return $this->status($transactionID, $remarks, $occasion);
139 139
     }
140 140
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
     public function fromMsisdnStatus($msisdn, $transactionID, $remarks, $occasion = '')
152 152
     {
153 153
         $this->partyA = $msisdn;
154
-        $this->identifierType = $this->identifier['msisdn'];
154
+        $this->identifierType = $this->identifier[ 'msisdn' ];
155 155
         return $this->status($transactionID, $remarks, $occasion);
156 156
     }
157 157
 
@@ -178,6 +178,6 @@  discard block
 block discarded – undo
178 178
             "Remarks" => $remarks,
179 179
             "Occasion" => $occasion
180 180
         ];
181
-        return $this->call($this->queryEndPoint, ['json' => $parameters]);
181
+        return $this->call($this->queryEndPoint, [ 'json' => $parameters ]);
182 182
     }
183 183
 }
184 184
\ No newline at end of file
Please login to merge, or discard this patch.
src/Requests/Balance.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
             "QueueTimeOutURL" => $this->queueTimeoutURL,
110 110
             "ResultURL" => $this->resultURL
111 111
         ];
112
-        return $this->call($this->queryEndPoint, ['json' => $parameters]);
112
+        return $this->call($this->queryEndPoint, [ 'json' => $parameters ]);
113 113
     }
114 114
 
115 115
 }
116 116
\ No newline at end of file
Please login to merge, or discard this patch.
src/Requests/C2B.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
             "ConfirmationURL" => $this->setUrl($confirmationUrl),
56 56
             "ValidationURL" => $this->setUrl($validationUrl)
57 57
         ];
58
-        return $this->call($this->urlRegistrationEndPoint, ['json' => $parameters]);
58
+        return $this->call($this->urlRegistrationEndPoint, [ 'json' => $parameters ]);
59 59
     }
60 60
 
61 61
     /**
@@ -116,6 +116,6 @@  discard block
 block discarded – undo
116 116
             "Msisdn" => $phoneNumber,
117 117
             "BillRefNumber" => $reference
118 118
         ];
119
-        return $this->call($this->simulationEndpoint, ['json' => $parameters]);
119
+        return $this->call($this->simulationEndpoint, [ 'json' => $parameters ]);
120 120
     }
121 121
 }
122 122
\ No newline at end of file
Please login to merge, or discard this patch.
src/Requests/B2C.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -196,6 +196,6 @@
 block discarded – undo
196 196
             "Occassion" => $occasion
197 197
         ];
198 198
 
199
-        return $response = $this->call($this->endPoint, ['json' => $parameters]);
199
+        return $response = $this->call($this->endPoint, [ 'json' => $parameters ]);
200 200
     }
201 201
 }
202 202
\ No newline at end of file
Please login to merge, or discard this patch.
src/LaravelDarajaServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
             'laravel-daraja'
42 42
         );
43 43
 
44
-        $this->app->bind('mpesa-api', function () {
44
+        $this->app->bind('mpesa-api', function() {
45 45
             return new MpesaApi();
46 46
         });
47 47
     }
Please login to merge, or discard this patch.