Completed
Push — master ( f920cb...5251c6 )
by Maik
01:19
created

Icon::setWidth()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
namespace Nkey\DDG\API\Model;
3
4
/**
5
 * Model for Icon property of related topics
6
 *
7
 * @author Maik Greubel <[email protected]>
8
 */
9
class Icon
10
{
11
12
    /**
13
     *
14
     * @var string
15
     */
16
    private $url = "";
17
18
    /**
19
     *
20
     * @var int
21
     */
22
    private $height = 0;
23
24
    /**
25
     *
26
     * @var int
27
     */
28
    private $width = 0;
29
30
    /**
31
     *
32
     * @return string
33
     */
34
    public function getURL(): string
35
    {
36
        return $this->url;
37
    }
38
39
    /**
40
     *
41
     * @param string $url
42
     * @return Icon
43
     */
44 2
    public function setURL(string $url)
45
    {
46 2
        $this->url = $url;
47 2
        return $this;
48
    }
49
50
    /**
51
     *
52
     * @return int
53
     */
54
    public function getHeight(): int
55
    {
56
        return $this->height;
57
    }
58
59
    /**
60
     *
61
     * @param number $height
62
     * @return Icon
63
     */
64 2
    public function setHeight(int $height)
65
    {
66 2
        $this->height = $height;
67 2
        return $this;
68
    }
69
70
    /**
71
     *
72
     * @return number
73
     */
74
    public function getWidth(): int
75
    {
76
        return $this->width;
77
    }
78
79
    /**
80
     *
81
     * @param number $width
82
     * @return Icon
83
     */
84 2
    public function setWidth(int $width)
85
    {
86 2
        $this->width = $width;
87 2
        return $this;
88
    }
89
}