Completed
Pull Request — master (#257)
by Éloi
01:56
created

MediaPlayer   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 74
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 74
ccs 15
cts 15
cp 1
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getUrl() 0 4 1
A setUrl() 0 6 1
A getWidth() 0 4 1
A setWidth() 0 6 1
A getHeight() 0 4 1
A setHeight() 0 6 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 MediaPlayer implements MediaPlayerInterface
14
{
15
    /**
16
     * @var string
17
     */
18
    protected $playerUrl;
19
20
    /**
21
     * @var int
22
     */
23
    protected $playerWidth;
24
25
    /**
26
     * @var int
27
     */
28
    protected $playerHeight;
29
30
    /**
31
     * @return string
32
     */
33 2
    public function getUrl() : ?string
34
    {
35 2
        return $this->playerUrl;
36
    }
37
38
    /**
39
     * @param  string $playerUrl
40
     * @return MediaPlayerInterface
41
     */
42 2
    public function setUrl(?string $playerUrl) : MediaPlayerInterface
43
    {
44 2
        $this->playerUrl = $playerUrl;
45
46 2
        return $this;
47
    }
48
49
    /**
50
     * @return int
51
     */
52 2
    public function getWidth() : ?int
53
    {
54 2
        return $this->playerWidth;
55
    }
56
57
    /**
58
     * @param  int $playerWidth
59
     * @return MediaPlayerInterface
60
     */
61 2
    public function setWidth(?int $playerWidth) : MediaPlayerInterface
62
    {
63 2
        $this->playerWidth = $playerWidth;
64
65 2
        return $this;
66
    }
67
68
    /**
69
     * @return int
70
     */
71 2
    public function getHeight() : ?int
72
    {
73 2
        return $this->playerHeight;
74
    }
75
76
    /**
77
     * @param  int $playerHeight
78
     * @return MediaPlayerInterface
79
     */
80 2
    public function setHeight(?int $playerHeight) : MediaPlayerInterface
81
    {
82 2
        $this->playerHeight = $playerHeight;
83
84 2
        return $this;
85
    }
86
}
87