Passed
Branch feature-dbal (8a3860)
by Thomas
08:32
created

Column::hasDefault()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace ORM\Dbal;
4
5
class Column
6
{
7
    /** @var string */
8
    protected $name;
9
10
    /** @var Type */
11
    protected $type;
12
13
    /** @var bool */
14
    protected $hasDefault;
15
16
    /** @var bool */
17
    protected $isNullable;
18
19
    /**
20
     * Column constructor.
21
     *
22
     * @param string $name
23
     * @param Type   $type
24
     * @param bool   $hasDefault
25
     * @param bool   $isNullable
26
     */
27 85
    public function __construct($name, Type $type, $hasDefault, $isNullable)
28
    {
29 85
        $this->name = $name;
30 85
        $this->type = $type;
31 85
        $this->hasDefault = $hasDefault;
32 85
        $this->isNullable = $isNullable;
33 85
    }
34
35
    /**
36
     * @return string
37
     */
38 3
    public function getName()
39
    {
40 3
        return $this->name;
41
    }
42
43
    /**
44
     * @return Type
45
     */
46 66
    public function getType()
47
    {
48 66
        return $this->type;
49
    }
50
51
    /**
52
     * @return bool
53
     */
54 10
    public function hasDefault()
55
    {
56 10
        return $this->hasDefault;
57
    }
58
59
    /**
60
     * @return bool
61
     */
62 6
    public function isNullable()
63
    {
64 6
        return $this->isNullable;
65
    }
66
}
67