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.

PaymentService::isProperModelAndAmount()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Shaxzodbek Qambaraliyev
5
 */
6
namespace Goodoneuz\PayUz\Services;
7
8
use App\User;
9
use Illuminate\Support\Facades\Log;
10
11
12
class PaymentService
13
{
14
    /*
15
    *   return string
16
    */
17
    public static function convertModelToKey($model){
18
        return require base_path('/app/Http/Controllers/Payments/model_key.php');
19
    }
20
    /*
21
    * $key - key of model
22
    * returns model or null
23
    *
24
    */    
25
    public static function convertKeyToModel($key){
26
        return require base_path('/app/Http/Controllers/Payments/key_model.php');
27
    }
28
    /*
29
    * returns true/false 
30
    */
31
    public static function isProperModelAndAmount($model, $amount){
32
        return require base_path('/app/Http/Controllers/Payments/is_proper.php');
33
    }
34
35
    /*
36
    * $model - Payable model
37
    * $amount - amount for pay
38
    * $action_type - type of action: before-pay, paying, after-pay, cancelled
39
    */
40
    public static function payListener($model, $transaction, $action_type){
41
        switch($action_type){
42
            case 'before-pay':
43
                require base_path('/app/Http/Controllers/Payments/before_pay.php');
44
                break;
45
46
            case 'paying': 
47
                require base_path('/app/Http/Controllers/Payments/paying.php');
48
            break;
49
50
            case 'after-pay': 
51
                require base_path('/app/Http/Controllers/Payments/after_pay.php');
52
                break;
53
                
54
            case 'cancel-pay': 
55
                require base_path('/app/Http/Controllers/Payments/cancel_pay.php');
56
                break;                
57
        }
58
    }
59
}
60
61