PassthruTrait::typePassthru()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 3
c 1
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 2
nc 2
nop 1
crap 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