ColumnRule   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 38
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A setTitle() 0 4 1
A getTitle() 0 4 1
A setType() 0 4 1
A getType() 0 4 1
1
<?php
2
3
namespace FForattini\Btrieve\Column;
4
5
use FForattini\Btrieve\Rule\Rule;
6
use FForattini\Btrieve\Rule\RuleInterface;
7
8
class ColumnRule extends Rule implements RuleInterface
9
{
10
    const TYPE_DATE = 0;
11
    const TYPE_FLOAT = 1;
12
    const TYPE_ID = 2;
13
    const TYPE_INT = 3;
14
    const TYPE_STRING = 4;
15
16
    protected $title;
17
    protected $type;
18
19
    public function __construct($title, $type, $length)
20
    {
21
        $this->setTitle($title);
22
        $this->setType($type);
23
        $this->setLength($length);
24
    }
25
26
    public function setTitle($title)
27
    {
28
        $this->title = $title;
29
    }
30
31
    public function getTitle()
32
    {
33
        return $this->title;
34
    }
35
36
    public function setType($type)
37
    {
38
        $this->type = $type;
39
    }
40
41
    public function getType()
42
    {
43
        return $this->type;
44
    }
45
}
46