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.

Issues (65)

src/Models/Merchant.php (3 issues)

Labels
Severity
1
<?php
2
3
namespace bSecure\UniversalCheckout\Models;
4
5
use bSecure\UniversalCheckout\Helpers\Helper;
6
use Illuminate\Database\Eloquent\Model;
0 ignored issues
show
The type Illuminate\Database\Eloquent\Model was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
8
class Merchant extends Model
9
{
10
    /**
11
     * Author: Sara Hasan
12
     * Date: 10-November-2020
13
     */
14
    public static function getMerchantAccessToken()
15
    {
16
        $merchantClientId = config('bSecure.client_id');
0 ignored issues
show
The function config was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

16
        $merchantClientId = /** @scrutinizer ignore-call */ config('bSecure.client_id');
Loading history...
17
        $merchantClientSecret = config('bSecure.client_secret');
18
19
        $merchantAppCredentials = ClientApp::verifyAppCredentials($merchantClientId, $merchantClientSecret);
20
21
        if (empty($merchantAppCredentials)) {
22
            return ['error' => true, 'message' => trans('bSecure::messages.client.invalid')];
0 ignored issues
show
The function trans was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

22
            return ['error' => true, 'message' => /** @scrutinizer ignore-call */ trans('bSecure::messages.client.invalid')];
Loading history...
23
        } else {
24
            if (!empty($merchantAppCredentials['client_id'])) {
25
                // Get Merchant Access Token
26
                $merchantToken = Helper::getAccessToken($merchantAppCredentials);
27
28
                if ($merchantToken['error']) {
29
                    return ['error' => true, 'message' => $merchantToken['message']];
30
                } else {
31
                    return ['error' => false, 'body' => $merchantToken['accessToken']];
32
                }
33
34
            } else if ($merchantAppCredentials['error']) {
35
                return $merchantAppCredentials;
36
            } else {
37
                return ['error' => true, 'message' => trans('bSecure::messages.general.failed')];
38
            }
39
        }
40
    }
41
}
42