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.

PaymentSystem   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 42
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A scopeStatus() 0 3 2
A params() 0 3 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Azizbek Eshonaliyev
5
 * Date: 2/15/2019
6
 * Time: 8:05 PM
7
 */
8
9
namespace Goodoneuz\PayUz\Models;
10
11
12
use Illuminate\Database\Eloquent\Model;
13
14
class PaymentSystem extends Model
15
{
16
17
    const NOT_ACTIVE = 'not_active';
18
    const ACTIVE = 'active';
19
20
    const PAYME     = 'payme';
21
    const CLICK     = 'click';
22
    const UPAY      = 'upay';
23
    const UZCARD    = 'uzcard';
24
    const MBANK     = 'mbank';
25
    const OSON      = 'oson';
26
    const VISA      = 'visa';
27
    const AGR       = 'agr';
28
    const PAYNET    = 'paynet';
29
    const CASH      = 'cash';
30
    const TERMINAL  = 'terminal';
31
    const STRIPE    = 'stripe';
32
    /**
33
     * @var array
34
     */
35
    protected $fillable =[
36
        'name',
37
        'system',
38
        'status'
39
    ];
40
    /**
41
     * @param $query
42
     * @param null $status
43
     * @return mixed
44
     */
45
    public function scopeStatus($query, $status = null){
46
        return $query->where('status',($status) ? $status : self::ACTIVE);
47
    }
48
49
    /**
50
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
51
     */
52
    public function params(){
53
        return $this->hasMany(PaymentSystemParam::class,'system','system');
54
    }
55
}
56