MigrationHelper::defaultColumns()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 10
ccs 9
cts 9
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
4
namespace FormEntries\Helpers;
5
6
use Illuminate\Database\Schema\Blueprint;
7
8
class MigrationHelper
9
{
10 22
    public static function defaultColumns(Blueprint $table)
11
    {
12 22
        $table->id();
13 22
        $table->string('type', 50)->default('default')->index();
14 22
        $table->string('content_type')->nullable()->index();
15 22
        $table->json('content')->nullable();
16 22
        $table->dateTime('notified_at')->nullable()->index();
17 22
        $table->nullableMorphs('sender');
18 22
        $table->json('meta')->nullable();
19 22
        $table->timestamps();
20
    }
21
}
22