MigrationHelper   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 8
c 1
b 0
f 0
dl 0
loc 12
ccs 8
cts 8
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A defaultColumns() 0 10 1
1
<?php
2
3
4
namespace Thinkone\NovaPageSettings;
5
6
use Illuminate\Database\Schema\Blueprint;
7
8
class MigrationHelper
9
{
10 10
    public static function defaultColumns(Blueprint $table)
11
    {
12 10
        $table->id();
13 10
        $table->string('type', 50)->default('default')->index();
14 10
        $table->string('page', 255)->index();
15 10
        $table->string('key', 100)->index();
16 10
        $table->text('value')->nullable();
17 10
        $table->timestamps();
18
19 10
        $table->index([ 'page', 'key', 'type' ]);
20
    }
21
}
22