Completed
Pull Request — master (#257)
by Éloi
02:08
created

MediaSubtitle   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 62
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 62
ccs 15
cts 15
cp 1
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setType() 0 5 1
A getType() 0 4 1
A setLang() 0 5 1
A getLang() 0 4 1
A setUrl() 0 5 1
A getUrl() 0 4 1
1
<?php declare(strict_types=1);
2
/*
3
 * This file is part of the feed-io package.
4
 *
5
 * (c) Alexandre Debril <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace FeedIo\Feed\Item;
12
13
class MediaSubtitle
14
{
15
    /**
16
     * @var string
17
     */
18
    protected $type;
19
20
    /**
21
     * @var string
22
     */
23
    protected $lang;
24
25
    /**
26
     * @var string
27
     */
28
    protected $url;
29
30
    /**
31
     * @param  string $type
32
     * @return MediaSubtitle
33
     */
34 1
    public function setType(? string $type) : MediaSubtitle
35
    {
36 1
        $this->type = $type;
37 1
        return $this;
38
    }
39
40 1
    public function getType() : ? string
41
    {
42 1
        return $this->type;
43
    }
44
45
    /**
46
     * @param  string $lang
47
     * @return MediaSubtitle
48
     */
49 1
    public function setLang(? string $lang) : MediaSubtitle
50
    {
51 1
        $this->lang = $lang;
52 1
        return $this;
53
    }
54
55 1
    public function getLang() : ? string
56
    {
57 1
        return $this->lang;
58
    }
59
60
    /**
61
     * @param  string|null url
62
     * @return MediaSubtitle
63
     */
64 1
    public function setUrl(? string $url) : MediaSubtitle
65
    {
66 1
        $this->url = $url;
67 1
        return $this;
68
    }
69
70 1
    public function getUrl() : ? string
71
    {
72 1
        return $this->url;
73
    }
74
}
75