CreatePaymentAccountsTable::down()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
/**
7
 * Class CreatePaymentAccountsTable
8
 *
9
 * @author  Mahmoud Zalt  <[email protected]>
10
 */
11 View Code Duplication
class CreatePaymentAccountsTable extends Migration
0 ignored issues
show
Duplication introduced by Johannes Schobel
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
12
{
13
14
    /**
15
     * Run the migrations.
16
     */
17
    public function up()
18
    {
19
        Schema::create('payment_accounts', function (Blueprint $table) {
20
21
            $table->increments('id');
22
            $table->string('name')->nullable();
23
24
            $table->morphs('accountable');
25
26
            $table->integer('user_id')->unsigned();
27
            $table->foreign('user_id')->references('id')->on('users');
28
29
            $table->timestamps();
30
            $table->softDeletes();
31
        });
32
    }
33
34
    /**
35
     * Reverse the migrations.
36
     */
37
    public function down()
38
    {
39
        Schema::drop('payment_accounts');
40
    }
41
}
42