AbstractColumn   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 35
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setName() 0 6 1
A getName() 0 4 1
A render() 0 4 1
1
<?php
2
3
namespace Cocur\Arff\Column;
4
5
/**
6
 * AbstractColumn
7
 *
8
 * @package   Cocur\Arff\Column
9
 * @author    Florian Eckerstorfer
10
 * @copyright 2015 Florian Eckerstorfer
11
 */
12
abstract class AbstractColumn implements ColumnInterface
13
{
14
    /**
15
     * @var string
16
     */
17
    protected $name;
18
19
    /**
20
     * @param string $name
21
     *
22
     * @return AbstractColumn
23
     */
24 4
    public function setName($name)
25
    {
26 4
        $this->name = $name;
27
28 4
        return $this;
29
    }
30
31
    /**
32
     * @return string
33
     */
34 4
    public function getName()
35
    {
36 4
        return $this->name;
37
    }
38
39
    /**
40
     * @return string
41
     */
42 2
    public function render()
43
    {
44 2
        return sprintf('@ATTRIBUTE %s %s', $this->getName(), $this->getType());
45
    }
46
}
47