Completed
Push — master ( 662b61...b40adf )
by George
04:45 queued 02:21
created

ColumnPattern::make()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 2
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: georg
5
 * Date: 5/29/2018
6
 * Time: 12:51 PM
7
 */
8
9
namespace Ghaskell\Scaffold;
10
11
12
class ColumnPattern
13
{
14
    public $type;
15
    public $name;
16
    public $config;
17
18
    public static function make(string $name, string $type) {
19
        $column  = new ColumnPattern();
20
        $column->name = $name;
21
        $column->type = $type;
22
        $column->config = config("scaffold.columnTypes.$type");
23
        return $column;
24
    }
25
}