GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

ColumnCreator   A
last analyzed

Complexity

Total Complexity 13

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 13

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 13
c 1
b 1
f 0
lcom 0
cbo 13
dl 0
loc 34
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
C create() 0 31 13
1
<?php
2
3
namespace Rentgen\Database\Column;
4
5
use Rentgen\Exception\NotSupportedException;
6
7
class ColumnCreator
8
{
9
    public function create($name, $type, array $options = array())
10
    {
11
        switch ($type) {
12
            case 'string':
13
                return new StringColumn($name, $options);
14
            case 'text':
15
                return new TextColumn($name, $options);
16
            case 'integer':
17
                return new IntegerColumn($name, $options);
18
            case 'biginteger':
19
                return new BigIntegerColumn($name, $options);
20
            case 'smallinteger':
21
                return new SmallIntegerColumn($name, $options);
22
            case 'float':
23
                return new FloatColumn($name, $options);
24
            case 'decimal':
25
                return new DecimalColumn($name, $options);
26
            case 'boolean':
27
                return new BooleanColumn($name, $options);
28
            case 'date':
29
                return new DateColumn($name, $options);
30
            case 'time':
31
                return new TimeColumn($name, $options);
32
            case 'datetime':
33
                return new DateTimeColumn($name, $options);
34
            case 'binary':
35
                return new BinaryColumn($name, $options);
36
            default:
37
                throw new NotSupportedException(sprintf('Type %s is not suppoted.', $type));
38
        }
39
    }
40
}
41