CreateSprintsTable::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 22
Code Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 22
rs 9.2
c 0
b 0
f 0
cc 1
eloc 19
nc 1
nop 0
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
class CreateSprintsTable extends Migration
7
{
8
    /**
9
     * Run the migrations.
10
     */
11
    public function up()
12
    {
13
        Schema::create('sprints', function (Blueprint $table) {
14
            $table->increments('id');
15
            $table->integer('user_id')->unsigned()->nullable()->index('fk_sprints_user_id_idx');
16
            $table->integer('product_backlog_id')->unsigned()->nullable()->index('fk_sprints_product_backlog_id_idx');
17
            $table->integer('config_status_id')->unsigned()->nullable()->index('fk_sprints_config_status_id_idx');
18
            $table->string('slug', 60)->nullable()->index('sprints_slug');
19
            $table->string('title')->nullable();
20
            $table->text('description', 65535)->nullable();
0 ignored issues
show
Unused Code introduced by
The call to Blueprint::text() has too many arguments starting with 65535.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
21
            $table->string('version', 10)->nullable();
22
            $table->date('date_start')->nullable();
23
            $table->date('date_finish')->nullable();
24
            $table->smallInteger('state')->unsigned()->nullable();
25
            $table->integer('position')->unsigned()->nullable()->default(0);
26
            $table->char('color', 6)->nullable()->default('257e4a');
27
            $table->boolean('is_private')->nullable()->default(0);
28
            $table->dateTime('closed_at')->nullable();
29
            $table->timestamps();
30
            $table->softDeletes();
31
        });
32
    }
33
34
    /**
35
     * Reverse the migrations.
36
     */
37
    public function down()
38
    {
39
        Schema::drop('sprints');
40
    }
41
}
42