CreateConfigurationsTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 26
c 0
b 0
f 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 8 1
A down() 0 3 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 CreateConfigurationsTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('configurations', function (Blueprint $table) {
17
            $table->increments('id');
18
            $table->string('configuration_name',255);
19
            $table->longtext('configuration_value',255);
0 ignored issues
show
Unused Code introduced by
The call to Illuminate\Database\Schema\Blueprint::longText() has too many arguments starting with 255. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

19
            $table->/** @scrutinizer ignore-call */ 
20
                    longtext('configuration_value',255);

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. Please note the @ignore annotation hint above.

Loading history...
20
            $table->boolean('configuration_active');
21
            $table->timestamps();
22
        });
23
    }
24
25
    /**
26
     * Reverse the migrations.
27
     *
28
     * @return void
29
     */
30
    public function down()
31
    {
32
        Schema::dropIfExists('configurations');
33
    }
34
}
35