CreateUserInvitationsTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 11 1
A down() 0 4 1
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
/**
8
 * Class CreateUserInvitationsTable.
9
 */
10
class CreateUserInvitationsTable extends Migration
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
11
{
12
    /**
13
     * Run the migrations.
14
     *
15
     * @return void
16
     */
17
    public function up()
18
    {
19
        Schema::create('user_invitations', function (Blueprint $table) {
20
            $table->increments('id');
21
            $table->string('email')->unique();
22
            $table->string('state');
23
            $table->string('token');
24
            $table->integer('user_id')->unsigned()->nullable();
25
            $table->timestamps();
26
        });
27
    }
28
29
    /**
30
     * Reverse the migrations.
31
     *
32
     * @return void
33
     */
34
    public function down()
35
    {
36
        Schema::dropIfExists('user_invitations');
37
    }
38
}
39