PassthruTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A typePassthru() 0 3 2
1
<?php
2
3
namespace ShiftOneLabs\LaravelNomad\Traits\Database\Schema\Grammars;
4
5
use Illuminate\Support\Fluent;
6
7
trait PassthruTrait
8
{
9
10
    /**
11
     * Create the column definition for a string type.
12
     *
13
     * @param \Illuminate\Support\Fluent $column
14
     * @return string
15
     */
16 1072
    protected function typePassthru(Fluent $column)
17
    {
18 1072
        return !empty($column->definition) ? $column->definition : $column->realType;
19
    }
20
}
21