Completed
Push — master ( a37b73...8ce218 )
by Chris
02:15
created

M3u8::isEndless()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
crap 1
1
<?php
2
3
/*
4
 * This file is part of the PhpM3u8 package.
5
 *
6
 * (c) Chrisyue <http://chrisyue.com/>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Chrisyue\PhpM3u8\M3u8;
13
14
class M3u8
15
{
16
    private $playlist;
17
    private $version;
18
    private $targetDuration;
19
    private $discontinuitySequence;
20
21 4
    public function __construct(Playlist $playlist, $version, $targetDuration, $discontinuitySequence = null)
22
    {
23 4
        $this->playlist = $playlist;
24 4
        $this->version = $version;
25 4
        $this->targetDuration = $targetDuration;
26 4
        $this->discontinuitySequence = $discontinuitySequence;
27 4
    }
28
29 2
    public function getPlaylist()
30
    {
31 2
        return $this->playlist;
32
    }
33
34 2
    public function getVersion()
35
    {
36 2
        return $this->version;
37
    }
38
39 2
    public function getTargetDuration()
40
    {
41 2
        return $this->targetDuration;
42
    }
43
44 2
    public function getMediaSequence()
45
    {
46 2
        return $this->playlist->getFirst()->getSequence();
47
    }
48
49 2
    public function getDiscontinuitySequence()
50
    {
51 2
        return $this->discontinuitySequence;
52
    }
53
54
    public function getAge()
55
    {
56
        return $this->playlist->getAge();
57
    }
58
59
    public function getDuration()
60
    {
61
        return $this->playlist->getDuration();
62
    }
63
64 2
    public function isEndless()
65
    {
66 2
        return $this->playlist->isEndless();
67
    }
68
}
69