GraphicalValueType   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 40
rs 10
c 0
b 0
f 0
wmc 3
lcom 1
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A addValue() 0 3 1
A getValue() 0 3 1
1
<?php
2
/**
3
 *
4
 */
5
6
/**
7
 * GraphicalValueType class
8
 *
9
 * @author Laurent De Coninck <[email protected]>
10
 */
11
class GraphicalValueType
12
{
13
14
    /**
15
     * @var GraphicalType
16
     */
17
    private $types;
18
19
    /**
20
     * @var GraphicalValue
21
     */
22
    private $counter;
23
24
    /**
25
     * GraphicalValueType constructor.
26
     *
27
     * @param GraphicalType  $types
28
     * @param GraphicalValue $graphicalValue
29
     */
30
    public function __construct(GraphicalType $types, GraphicalValue $graphicalValue)
31
    {
32
        $this->types = $types;
33
        $this->counter = $graphicalValue;
34
    }
35
36
    /**
37
     * @param GraphicalValue $value
38
     */
39
    public function addValue(GraphicalValue $value){
40
        $this->counter = $this->counter->add($value);
41
    }
42
43
    /**
44
     * @return int
45
     */
46
    public function getValue(){
47
        return $this->counter->getValue();
48
    }
49
50
}