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.

CreatePaymentSystemsTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 100 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 4
dl 28
loc 28
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 10 10 1
A down() 4 4 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7 View Code Duplication
class CreatePaymentSystemsTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('payment_systems', function (Blueprint $table) {
17
            $table->increments('id');
18
            $table->string('name')->nullable();
19
            $table->string('system')->unique();
20
            $table->string('status')->default(\Goodoneuz\PayUz\Models\PaymentSystem::NOT_ACTIVE);
21
            $table->timestamps();
22
        });
23
    }
24
25
    /**
26
     * Reverse the migrations.
27
     *
28
     * @return void
29
     */
30
    public function down()
31
    {
32
        Schema::dropIfExists('payment_systems');
33
    }
34
}
35