BoxDimension   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 2 Features 0
Metric Value
wmc 5
c 2
b 2
f 0
lcom 0
cbo 0
dl 0
loc 65
ccs 14
cts 14
cp 1
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getWidth() 0 4 1
A getHeight() 0 4 1
A __construct() 0 5 1
A setWidth() 0 5 1
A setHeight() 0 5 1
1
<?php
2
namespace Soluble\Media;
3
4
class BoxDimension
5
{
6
    /**
7
     *
8
     * @var integer
9
     */
10
    protected $width;
11
    /**
12
     *
13
     * @var integer
14
     */
15
    protected $height;
16
17
    /**
18
     *
19
     * @param int $width
20
     * @param int $height
21
     */
22 4
    public function __construct($width = null, $height = null)
23
    {
24 4
        $this->setWidth($width);
25 4
        $this->setHeight($height);
26 4
    }
27
28
29
    /**
30
     *
31
     * @param int $width
32
     * @return \Soluble\Media\BoxDimension
33
     */
34 4
    public function setWidth($width)
35
    {
36 4
        $this->width = $width;
37 4
        return $this;
38
    }
39
40
    /**
41
     *
42
     * @return int
43
     */
44 1
    public function getWidth()
45
    {
46 1
        return $this->width;
47
    }
48
49
    /**
50
     *
51
     * @param int $height
52
     * @return \Soluble\Media\BoxDimension
53
     */
54 4
    public function setHeight($height)
55
    {
56 4
        $this->height = $height;
57 4
        return $this;
58
    }
59
60
    /**
61
     *
62
     * @return int
63
     */
64 1
    public function getHeight()
65
    {
66 1
        return $this->height;
67
    }
68
}
69