Deg   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A addDataElement() 0 4 1
A toString() 0 4 1
A __toString() 0 4 1
1
<?php
2
3
namespace Fhp;
4
5
/**
6
 * Class Deg (Data Element Group)
7
 * @package Fhp
8
 */
9
class Deg
10
{
11
    /** @var array  */
12
    protected $dataElements = array();
13
14
    /**
15
     * Adds a data element to the data element group.
16
     *
17
     * @param mixed $value
18
     */
19 13
    public function addDataElement($value)
20
    {
21 13
        $this->dataElements[] = $value;
22 13
    }
23
24 13
    public function toString()
25
    {
26 13
        return (string) implode(':', $this->dataElements);
27
    }
28
29
    /**
30
     * @return string
31
     */
32 13
    public function __toString()
33
    {
34 13
        return $this->toString();
35
    }
36
}
37