OtherField::makeField()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 3
nc 2
nop 1
dl 0
loc 6
ccs 4
cts 4
cp 1
crap 2
rs 10
c 1
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: liow.kitloong
5
 * Date: 2020/03/29
6
 */
7
8
namespace KitLoong\MigrationsGenerator\Generators;
9
10
class OtherField
11
{
12 3
    public function makeField(array $field): array
13
    {
14 3
        if (isset(FieldGenerator::$fieldTypeMap[$field['type']])) {
15 3
            $field['type'] = FieldGenerator::$fieldTypeMap[$field['type']];
16
        }
17 3
        return $field;
18
    }
19
}
20