Completed
Push — master ( 1b316c...8fba66 )
by Albert
02:34
created

Xkcd::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 9.4285
cc 1
eloc 4
nc 1
nop 3
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Nastoletni\Code\Domain;
6
7
class Xkcd
8
{
9
    /**
10
     * @var string
11
     */
12
    private $url;
13
14
    /**
15
     * @var string
16
     */
17
    private $imageUrl;
18
19
    /**
20
     * @var string
21
     */
22
    private $alternateText;
23
24
    /**
25
     * Xkcd constructor.
26
     *
27
     * @param string $url
28
     * @param string $imageUrl
29
     * @param string $alternateText
30
     */
31 1
    public function __construct(string $url, string $imageUrl, string $alternateText)
32
    {
33 1
        $this->url = $url;
34 1
        $this->imageUrl = $imageUrl;
35 1
        $this->alternateText = $alternateText;
36 1
    }
37
38
    /**
39
     * @return string
40
     */
41 1
    public function getUrl(): string
42
    {
43 1
        return $this->url;
44
    }
45
46
    /**
47
     * @return string
48
     */
49 1
    public function getImageUrl(): string
50
    {
51 1
        return $this->imageUrl;
52
    }
53
54
    /**
55
     * @return string
56
     */
57 1
    public function getAlternateText(): string
58
    {
59 1
        return $this->alternateText;
60
    }
61
}
62