Completed
Pull Request — release/3.0 (#204)
by
unknown
04:44
created

Media::getUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
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 Media implements MediaInterface
14
{
15
16
    /**
17
     * @var string
18
     */
19
    protected $type;
20
21
    /**
22
     * @var string
23
     */
24
    protected $url;
25
26
    /**
27
     * @var int
28
     */
29
    protected $length;
30
31
    /**
32
     * @return string
33
     */
34
    public function getType()
35
    {
36
        return $this->type;
37
    }
38
39
    /**
40
     * @param  string $type
41
     * @return $this
42
     */
43
    public function setType($type)
44
    {
45
        $this->type = $type;
46
47
        return $this;
48
    }
49
50
    /**
51
     * @return string
52
     */
53
    public function getUrl()
54
    {
55
        return $this->url;
56
    }
57
58
    /**
59
     * @param  string $url
60
     * @return $this
61
     */
62
    public function setUrl($url)
63
    {
64
        $this->url = $url;
65
66
        return $this;
67
    }
68
69
    /**
70
     * @return string
71
     */
72
    public function getLength()
73
    {
74
        return $this->length;
75
    }
76
77
    /**
78
     * @param  string $length
79
     * @return $this
80
     */
81
    public function setLength($length)
82
    {
83
        $this->length = intval($length);
84
85
        return $this;
86
    }
87
}
88