Icon::getWidth()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
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 3
    public function setURL(string $url)
45
    {
46 3
        $this->url = $url;
47 3
        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 3
    public function setHeight(int $height)
65
    {
66 3
        $this->height = $height;
67 3
        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 3
    public function setWidth(int $width)
85
    {
86 3
        $this->width = $width;
87 3
        return $this;
88
    }
89
}