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/Controllers/Orders/IOPNController.php (5 issues)

Labels
Severity
1
<?php
2
3
namespace bSecure\UniversalCheckout\Controllers\Orders;
4
5
use App\Http\Controllers\Controller;
0 ignored issues
show
The type App\Http\Controllers\Controller 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...
6
7
8
//Models
9
use bSecure\UniversalCheckout\Models\Order;
10
11
//Helper
12
use bSecure\UniversalCheckout\Helpers\AppException;
0 ignored issues
show
The type bSecure\UniversalCheckout\Helpers\AppException 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...
13
use bSecure\UniversalCheckout\Helpers\ApiResponseHandler;
14
15
//Facade
16
use Validator;
0 ignored issues
show
The type Validator 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...
17
18
//Instant Order Processing Notification
19
class IOPNController extends Controller
20
{
21
22
    /**
23
     * Author: Sara Hasan
24
     * Date: 26-November-2020
25
     */
26
    public function orderStatus($order_ref)
27
    {
28
        try {
29
30
            $validationErrors = $this->_checkForValidationRule( $order_ref );
31
32
            if( count( $validationErrors ) > 0 )
33
            {
34
                return ApiResponseHandler::validationError( $validationErrors );
35
            }
36
37
            $orderResponse = Order::getOrderStatus($order_ref);
38
39
            if($orderResponse['error'])
40
            {
41
                return ApiResponseHandler::failure($orderResponse['message']);
42
            }else{
43
                $response = $orderResponse['body'];
44
45
                return ApiResponseHandler::success($response, trans('bSecure::messages.order.status.success'));
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

45
                return ApiResponseHandler::success($response, /** @scrutinizer ignore-call */ trans('bSecure::messages.order.status.success'));
Loading history...
46
            }
47
        } catch (\Exception $e) {
48
            return ApiResponseHandler::failure(trans('bSecure::messages.order.status.failure'), $e->getTraceAsString());
49
        }
50
    }
51
52
    private function _checkForValidationRule($order_ref )
53
    {
54
        $errors = [];
55
56
57
        if( empty($order_ref) )
58
        {
59
            $errors[] = trans('bSecure::messages.validation.order_ref.required');
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

59
            $errors[] = /** @scrutinizer ignore-call */ trans('bSecure::messages.validation.order_ref.required');
Loading history...
60
        }
61
62
        return $errors;
63
    }
64
}
65