Completed
Push — master ( 973d74...fb97b2 )
by Nicolas
16:07 queued 06:09
created

AspectRatio   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 53
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getValue() 0 4 1
A getLabel() 0 4 1
A isChecked() 0 4 1
1
<?php
2
3
namespace Presta\ImageBundle\Model;
4
5
/**
6
 * @author Benoit Jouhaud <[email protected]>
7
 */
8
class AspectRatio
9
{
10
    /**
11
     * @var float
12
     */
13
    private $value;
14
15
    /**
16
     * @var string
17
     */
18
    private $label;
19
20
    /**
21
     * @var bool
22
     */
23
    private $checked = false;
24
25
    /**
26
     * @param float $value
27
     * @param string $label
28
     * @param bool $checked
29
     */
30
    public function __construct($value, $label, $checked = false)
31
    {
32
        $this->value = $value;
33
        $this->label = $label;
34
        $this->checked = $checked;
35
    }
36
37
    /**
38
     * @return float
39
     */
40
    public function getValue()
41
    {
42
        return $this->value;
43
    }
44
45
    /**
46
     * @return string
47
     */
48
    public function getLabel()
49
    {
50
        return $this->label;
51
    }
52
53
    /**
54
     * @return bool
55
     */
56
    public function isChecked()
57
    {
58
        return $this->checked;
59
    }
60
}
61