MigrationHelper::defaultColumns()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 18
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 8
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 18
ccs 9
cts 9
cp 1
crap 1
rs 10
1
<?php
2
3
namespace NovaSeoEntity\Database;
4
5
use Illuminate\Database\Schema\Blueprint;
6
7
class MigrationHelper
8
{
9 9
    public static function defaultColumns(Blueprint $table)
10
    {
11 9
        $table->id();
12 9
        $table->morphs('seoptimisable');
13 9
        $table->string('robots')->nullable();
14 9
        $table->string('title')->nullable();
15 9
        $table->string('description')->nullable();
16 9
        $table->string('canonical')->nullable();
17 9
        $table->string('image')->nullable();
18
19
        // Future implementation
20
        // $table->json('meta')->nullable();
21
        // $table->json('open_graph')->nullable();
22
        // $table->json('twitter_card')->nullable();
23
        // $table->json('json_ld')->nullable();
24
        // $table->json('json_ld_multi')->nullable();
25
26 9
        $table->timestamps();
27
    }
28
}
29