GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Test Setup Failed
Branch master (472873)
by bSecure
14:19
created
src/CheckoutServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function register()
15 15
     {
16
-        $this->app->bind("bSecure_facade", function(){
16
+        $this->app->bind("bSecure_facade", function() {
17 17
             return new BsecureCheckout();
18 18
         });
19 19
 
@@ -26,17 +26,17 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public function boot()
28 28
     {
29
-        $this->loadTranslationsFrom( resource_path('lang/vendor/bSecure'),'bSecure');
29
+        $this->loadTranslationsFrom(resource_path('lang/vendor/bSecure'), 'bSecure');
30 30
 
31 31
 
32 32
         if ($this->app->runningInConsole()) {
33 33
 
34 34
             $this->publishes([
35
-              __DIR__.'/config/config.php' => config_path('bSecure.php'),
35
+              __DIR__ . '/config/config.php' => config_path('bSecure.php'),
36 36
             ], 'config');
37 37
 
38 38
             $this->publishes([
39
-              __DIR__.'/lang/en/messages.php' => resource_path('lang/vendor/bSecure/en/messages.php'),
39
+              __DIR__ . '/lang/en/messages.php' => resource_path('lang/vendor/bSecure/en/messages.php'),
40 40
             ]);
41 41
         }
42 42
     }
Please login to merge, or discard this patch.
src/Helpers/Language.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 class Language
6 6
 {
7
-    static function getMessage($key){
7
+    static function getMessage($key) {
8 8
         return __($key);
9 9
     }
10 10
 }
Please login to merge, or discard this patch.
src/Helpers/Helper.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
           ],
66 66
         ]);
67 67
 
68
-        $result = json_decode((string)$response->getBody("access_token"), true);
68
+        $result = json_decode((string) $response->getBody("access_token"), true);
69 69
 
70 70
         if (isset($result['status']) && $result['status'] == Constant::HTTP_RESPONSE_STATUSES['success']) {
71 71
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
         $headers = ['Authorization' => 'Bearer ' . $merchantAccessToken];
119 119
 
120
-        $result = Helper::apiRequest($method, $url, [],$order_ref , $headers, 'form_params');
120
+        $result = Helper::apiRequest($method, $url, [], $order_ref, $headers, 'form_params');
121 121
 
122 122
         if (isset($result['status']) && $result['status'] == Constant::HTTP_RESPONSE_STATUSES['success']) {
123 123
             $response = ['error' => false, 'body' => $result['body']];
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 
141 141
         $headers = ['Authorization' => 'Bearer ' . $merchantAccessToken];
142 142
 
143
-        $result = Helper::apiRequest($method, $url, [],$payload , $headers, 'form_params');
143
+        $result = Helper::apiRequest($method, $url, [], $payload, $headers, 'form_params');
144 144
 
145 145
         if (isset($result['status']) && $result['status'] == Constant::HTTP_RESPONSE_STATUSES['success']) {
146 146
             $response = ['error' => false, 'body' => $result['body']];
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
               'form_params' => $ssoPayload
167 167
             ]);
168 168
 
169
-            $result = json_decode((string)$response->getBody("access_token"), true);
169
+            $result = json_decode((string) $response->getBody("access_token"), true);
170 170
 
171 171
             if (isset($result['status']) && $result['status'] == Constant::HTTP_RESPONSE_STATUSES['success']) {
172 172
                 $response = ['error' => false, 'body' => $result['body']];
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
         } else {
194 194
             $merchantAccessToken = $merchantToken['body'];
195 195
             // Call Create Order API
196
-            $response = Helper::getCustomerProfile($merchantAccessToken,$ssoCustomerProfile);
196
+            $response = Helper::getCustomerProfile($merchantAccessToken, $ssoCustomerProfile);
197 197
 
198 198
             if ($response['error']) {
199 199
                 return ['error' => true, 'message' => $response['body']['message']];
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
      * Author: Sara Hasan
210 210
      * Date: 26-November-2020
211 211
      */
212
-    public static function getCustomerProfile($merchantAccessToken,$ssoCustomerProfile)
212
+    public static function getCustomerProfile($merchantAccessToken, $ssoCustomerProfile)
213 213
     {
214 214
         $method = 'POST';
215 215
 
Please login to merge, or discard this patch.
src/Helpers/ApiResponseHandler.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@  discard block
 block discarded – undo
10 10
      * @param string $message
11 11
      * @return \Illuminate\Http\JsonResponse
12 12
      */
13
-    public static function success( $body = [], $message ="messages.general.success" ){
13
+    public static function success($body = [], $message = "messages.general.success") {
14 14
 
15 15
         return  self::send(
16
-          Http::$Codes[ Http::SUCCESS ],
17
-          [Language::getMessage( $message )],
16
+          Http::$Codes[Http::SUCCESS],
17
+          [Language::getMessage($message)],
18 18
           (object) $body,
19 19
           null
20 20
         );
@@ -25,23 +25,23 @@  discard block
 block discarded – undo
25 25
      * @param string $message
26 26
      * @return \Illuminate\Http\JsonResponse
27 27
      */
28
-    public static function validationError( $validationErrors, $message = "general.validation" ){
28
+    public static function validationError($validationErrors, $message = "general.validation") {
29 29
 
30 30
         $errorMessages = [];
31 31
 
32
-        if( is_array( $validationErrors ) ){
33
-            $errorMessages = array_values( $validationErrors );
32
+        if (is_array($validationErrors)) {
33
+            $errorMessages = array_values($validationErrors);
34 34
         }
35 35
         else
36 36
         {
37
-            foreach( $validationErrors->getMessages() as $key => $errors )
37
+            foreach ($validationErrors->getMessages() as $key => $errors)
38 38
             {
39
-                $errorMessages = array_merge( $errorMessages, $errors );
39
+                $errorMessages = array_merge($errorMessages, $errors);
40 40
             }
41 41
         }
42 42
 
43 43
         return self::send(
44
-          Http::$Codes[ Http::INPROCESSABLE ],
44
+          Http::$Codes[Http::INPROCESSABLE],
45 45
           $errorMessages,
46 46
           (object) [],
47 47
           null
@@ -51,11 +51,11 @@  discard block
 block discarded – undo
51 51
     /**
52 52
      * @return \Illuminate\Http\JsonResponse
53 53
      */
54
-    public static function authenticationError(){
54
+    public static function authenticationError() {
55 55
 
56 56
         return self::send(
57
-          Http::$Codes[ Http::UNAUTHORISED ],
58
-          [Language::getMessage( "general.unauthenticated" )],
57
+          Http::$Codes[Http::UNAUTHORISED],
58
+          [Language::getMessage("general.unauthenticated")],
59 59
           (object) [],
60 60
           null
61 61
         );
@@ -67,10 +67,10 @@  discard block
 block discarded – undo
67 67
      * @param array $body
68 68
      * @return \Illuminate\Http\JsonResponse
69 69
      */
70
-    public static function failure( $message = 'general.error', $exception=null, $body = [] ){
70
+    public static function failure($message = 'general.error', $exception = null, $body = []) {
71 71
         return self::send(
72
-          Http::$Codes[ Http::BAD_REQUEST ],
73
-          (gettype($message) == "array") ? $message : [ Language::getMessage( $message ) ],
72
+          Http::$Codes[Http::BAD_REQUEST],
73
+          (gettype($message) == "array") ? $message : [Language::getMessage($message)],
74 74
           (object) $body,
75 75
           $exception
76 76
         );
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      * @return \Illuminate\Http\JsonResponse
84 84
      */
85 85
 
86
-    public static function exception( $code, $message, $exception=null ){
86
+    public static function exception($code, $message, $exception = null) {
87 87
         return self::send(
88 88
           $code,
89 89
           [$message],
@@ -99,13 +99,13 @@  discard block
 block discarded – undo
99 99
      * @param $exception
100 100
      * @return \Illuminate\Http\JsonResponse
101 101
      */
102
-    private static function send( $status, $message, $body, $exception ){
102
+    private static function send($status, $message, $body, $exception) {
103 103
 
104 104
         return response()->json([
105 105
           'status'    =>  $status,
106 106
           'message'   =>  $message,
107 107
           'body'      =>  $body,
108 108
           'exception' =>  $exception
109
-        ], $status, [], JSON_UNESCAPED_UNICODE );
109
+        ], $status, [], JSON_UNESCAPED_UNICODE);
110 110
     }
111 111
 }
Please login to merge, or discard this patch.
src/Helpers/Http.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
         self::INPROCESSABLE => 422
38 38
     ];
39 39
 
40
-    public static function getApiPossibleCodes(){
41
-        return array_values( self::$Codes );
40
+    public static function getApiPossibleCodes() {
41
+        return array_values(self::$Codes);
42 42
     }
43 43
 
44 44
     public static function getIpDetails($ip)
@@ -49,6 +49,6 @@  discard block
 block discarded – undo
49 49
 
50 50
         $accessKey = env('IPSTACK_API_KEY');
51 51
         $url = env('IPSTACK_URL') . $ip . '?access_key=' . $accessKey;
52
-        return Helper::apiRequest( 'GET',$url);
52
+        return Helper::apiRequest('GET', $url);
53 53
     }
54 54
 }
Please login to merge, or discard this patch.
src/config/config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 return [
4 4
 
5 5
   'client_id' => env('BSECURE_CLIENT_ID', ''),
6
-  'client_secret' => env('BSECURE_CLIENT_SECRET',''),
6
+  'client_secret' => env('BSECURE_CLIENT_SECRET', ''),
7 7
 
8 8
   //use 'production' for live orders and 'sandbox' for testing orders. When left empty or `null` the sandbox environment will be used
9 9
   'environment' => env('BSECURE_ENVIRONMENT'),
Please login to merge, or discard this patch.
src/BsecureSSO.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
     {
18 18
         try {
19 19
             $client = new VerifyClientController();
20
-            $result = $client->verifyClient($state,Constant::APP_TYPE['checkout']);
21
-            return json_decode($result->getContent(),true);
20
+            $result = $client->verifyClient($state, Constant::APP_TYPE['checkout']);
21
+            return json_decode($result->getContent(), true);
22 22
             //code...
23 23
         } catch (\Throwable $th) {
24 24
             throw $th;
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
     {
34 34
         try {
35 35
             $client = new VerifyClientController();
36
-            $result = $client->verifyClient($state,Constant::APP_TYPE['sdk']);
37
-            return json_decode($result->getContent(),true);
36
+            $result = $client->verifyClient($state, Constant::APP_TYPE['sdk']);
37
+            return json_decode($result->getContent(), true);
38 38
             //code...
39 39
         } catch (\Throwable $th) {
40 40
             throw $th;
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         try {
51 51
             $customer = new CustomerVerification();
52 52
             $result = $customer->verifyCustomer($auth_code);
53
-            return json_decode($result->getContent(),true);
53
+            return json_decode($result->getContent(), true);
54 54
             //code...
55 55
         } catch (\Throwable $th) {
56 56
             throw $th;
Please login to merge, or discard this patch.
src/SSOServiceProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function register()
15 15
     {
16
-        $this->app->bind("sso_facade", function(){
16
+        $this->app->bind("sso_facade", function() {
17 17
             return new BsecureSSO();
18 18
         });
19 19
     }
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
          * Optional methods to load your package assets
30 30
          */
31 31
 
32
-        $this->loadTranslationsFrom( __DIR__.('./resources/lang/'),'bSecure');
32
+        $this->loadTranslationsFrom(__DIR__ . ('./resources/lang/'), 'bSecure');
33 33
 
34 34
         // $this->loadViewsFrom(__DIR__.'/../resources/views', 'universal-checkout');
35 35
         // $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         if ($this->app->runningInConsole()) {
39 39
 
40 40
             $this->publishes([
41
-              __DIR__.'/config/config.php' => config_path('bSecure.php'),
41
+              __DIR__ . '/config/config.php' => config_path('bSecure.php'),
42 42
             ], 'config');
43 43
 
44 44
 
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
 
55 55
             // Publishing the translation files.
56 56
             $this->publishes([
57
-              __DIR__.'/resources/lang' => resource_path('lang/vendor/bSecure'),
58
-            ],'lang');
57
+              __DIR__ . '/resources/lang' => resource_path('lang/vendor/bSecure'),
58
+            ], 'lang');
59 59
 
60 60
             // Registering package commands.
61 61
             // $this->commands([]);
Please login to merge, or discard this patch.
src/BsecureCheckout.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         try {
102 102
             $order = new CreateOrderController();
103 103
             $result = $order->create($this->orderPayload);
104
-            return json_decode($result->getContent(),true);
104
+            return json_decode($result->getContent(), true);
105 105
 //            return $result->getContent();
106 106
             //code...
107 107
         } catch (\Throwable $th) {
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         try {
119 119
             $customer = new IOPNController();
120 120
             $result = $customer->orderStatus($order_ref);
121
-            return json_decode($result->getContent(),true);
121
+            return json_decode($result->getContent(), true);
122 122
             //code...
123 123
         } catch (\Throwable $th) {
124 124
             throw $th;
Please login to merge, or discard this patch.