CreateMasterTarifTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 19 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
use Kalnoy\Nestedset\NestedSet;
7
8
class CreateMasterTarifTable 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...
9
{
10
    /**
11
     * Run the migrations.
12
     *
13
     * @return void
14
     */
15
    public function up()
16
    {
17
        // Schema::dropIfExist('master_tarifs');
0 ignored issues
show
Unused Code Comprehensibility introduced by
63% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
18
        Schema::create('master_tarifs', function(Blueprint $table) {
19
			$table->increments('id');
20
			$table->uuid('uuid', 191)->unique();
21
			$table->string('nama', 191)->unique();
22
			$table->string('dasar_hukum', 191)->nullable();
23
            $table->boolean('status')->nullable()->index();
24
            $table->integer('level')->index();
25
			$table->integer('daftar_retribusi_id')->unsigned()->nullable()->index();
26
			$table->uuid('daftar_retribusi_uuid', 191)->index();
27
			$table->integer('user_id')->unsigned()->index();
28
            $table->integer('user_update')->unsigned()->index();
29
            NestedSet::columns($table);
30
			$table->timestamps();
31
			$table->softDeletes();
32
		});
33
    }
34
35
    /**
36
     * Reverse the migrations.
37
     *
38
     * @return void
39
     */
40
    public function down()
41
    {
42
        Schema::drop('master_tarifs');
43
    }
44
}
45