Completed
Push — master ( 5c6350...61c78a )
by Nicolas
14:48 queued 11:44
created

CreateTagTagsTable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 34
ccs 18
cts 18
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 17 1
A down() 0 5 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreateTagTagsTable extends Migration
0 ignored issues
show
Coding Style Compatibility introduced by Nicolas Widart
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...
8
{
9
    /**
10
     * Run the migrations.
11
     * @return void
12
     */
13 10
    public function up()
14
    {
15
        Schema::create('tag__tags', function (Blueprint $table) {
0 ignored issues
show
Bug introduced by Nicolas Widart
The method create() does not exist on Illuminate\Support\Facades\Schema. Did you maybe mean createFreshMockInstance()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
16 10
            $table->engine = 'InnoDB';
17 10
            $table->increments('id');
18 10
            $table->string('namespace');
19 10
            $table->timestamps();
20 10
        });
21
22 10
        Schema::create('tag__tagged', function (Blueprint $table) {
0 ignored issues
show
Bug introduced by Nicolas Widart
The method create() does not exist on Illuminate\Support\Facades\Schema. Did you maybe mean createFreshMockInstance()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
23 10
            $table->increments('id');
24 10
            $table->string('taggable_type');
25 10
            $table->integer('taggable_id')->unsigned();
26 10
            $table->integer('tag_id')->unsigned();
27 10
            $table->index(['taggable_type', 'taggable_id']);
28 10
        });
29 10
    }
30
31
    /**
32
     * Reverse the migrations.
33
     * @return void
34
     */
35 10
    public function down()
36
    {
37 10
        Schema::drop('tag__tags');
38 10
        Schema::drop('tag__tagged');
39 10
    }
40
}
41