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.

PayUzSeeder   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 121
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 121
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B run() 0 113 3
1
<?php
2
3
namespace Goodoneuz\PayUz\Database\Seeds;
4
5
use Illuminate\Database\Seeder;
6
use Illuminate\Support\Facades\Schema;
7
use Goodoneuz\PayUz\Models\PaymentSystem;
8
use Goodoneuz\PayUz\Models\PaymentSystemParam;
9
10
class PayUzSeeder extends Seeder
11
{
12
    /**
13
     * Run the database seeds.
14
     *
15
     * @return void
16
     */
17
    public function run()
18
    {
19
        if (Schema::hasTable('payment_systems')) {
20
            PaymentSystem::firstOrCreate([
21
                'name'      => 'Payme',
22
                'system'    => 'payme'
23
            ]);
24
            PaymentSystem::firstOrCreate([
25
                'name'      => 'Click',
26
                'system'    => 'click'
27
            ]);
28
            PaymentSystem::firstOrCreate([
29
                'name'      => 'Paynet',
30
                'system'    => 'paynet'
31
            ]);
32
            PaymentSystem::firstOrCreate([
33
                'name'      => 'Stripe',
34
                'system'    => 'stripe'
35
            ]);
36
        }
37
        if (Schema::hasTable('payment_system_params')) {
38
            //Paycom
39
            PaymentSystemParam::firstOrCreate([
40
                'system'    => 'payme',
41
                'label'     => 'Login',
42
                'name'      => 'login',
43
                'value'     => 'Paycom'
44
            ]);
45
            PaymentSystemParam::firstOrCreate([
46
                'system'    => 'payme',
47
                'label'     => 'Merchant id',
48
                'name'      => 'merchant_id',
49
                'value'     => 'merchant'
50
            ]);
51
            PaymentSystemParam::firstOrCreate([
52
                'system'    => 'payme',
53
                'label'     => 'Password',
54
                'name'      => 'password',
55
                'value'     => 'password'
56
            ]);
57
            PaymentSystemParam::firstOrCreate([
58
                'system'    => 'payme',
59
                'label'     => 'Key',
60
                'name'      => 'key',
61
                'value'     => 'key'
62
            ]);
63
            //Click
64
            PaymentSystemParam::firstOrCreate([
65
                'system'    => 'click',
66
                'label'     => 'Service id',
67
                'name'      => 'service_id',
68
                'value'     => 'service_id'
69
            ]);
70
            PaymentSystemParam::firstOrCreate([
71
                'system'    => 'click',
72
                'label'     => 'Secret key',
73
                'name'      => 'secret_key',
74
                'value'     => 'key'
75
            ]);
76
            PaymentSystemParam::firstOrCreate([
77
                'system'    => 'click',
78
                'label'     => 'Merchant Id',
79
                'name'      => 'merchant_id',
80
                'value'     => '0000'
81
            ]);
82
            PaymentSystemParam::firstOrCreate([
83
                'system'    => 'click',
84
                'label'     => 'Merchant user id',
85
                'name'      => 'merchant_user_id',
86
                'value'     => '0000'
87
            ]);
88
89
            //Paynet
90
            PaymentSystemParam::firstOrCreate([
91
                'system'    => 'paynet',
92
                'label'     => 'Login',
93
                'name'      => 'login',
94
                'value'     => 'login'
95
            ]);
96
            PaymentSystemParam::firstOrCreate([
97
                'system'    => 'paynet',
98
                'label'     => 'Password',
99
                'name'      => 'password',
100
                'value'     => 'password'
101
            ]);
102
            PaymentSystemParam::firstOrCreate([
103
                'system'    => 'paynet',
104
                'label'     => 'Service id',
105
                'name'      => 'service_id',
106
                'value'     => 'service_id'
107
            ]);
108
            
109
            PaymentSystemParam::firstOrCreate([
110
                'system'    => 'stripe',
111
                'label'     => 'Secret key',
112
                'name'      => 'secret_key',
113
                'value'     => 'secret_key'
114
            ]);
115
            
116
            PaymentSystemParam::firstOrCreate([
117
                'system'    => 'stripe',
118
                'label'     => 'Publishable key',
119
                'name'      => 'publishable_key',
120
                'value'     => 'publishable_key'
121
            ]);
122
            PaymentSystemParam::firstOrCreate([
123
                'system'    => 'stripe',
124
                'label'     => 'Proxy',
125
                'name'      => 'proxy',
126
                'value'     => ''
127
            ]);
128
        }
129
    }
130
}
131