OtherField   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A makeField() 0 6 2
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