Completed
Pull Request — develop (#10)
by
unknown
12:26
created

MediaSegment::getByterange()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 0
cp 0
crap 2
rs 10
c 0
b 0
f 0
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 MediaSegment
15
{
16
    protected $uri;
17
    protected $duration;
18
    protected $sequence;
19
    protected $isDiscontinuity;
20
    protected $title;
21
    protected $byterange;
22 4
23
    public function __construct($uri, $duration, $sequence, $isDiscontinuity = false, $title = null, $byterange = null)
24 4
    {
25 4
        $this->uri = $uri;
26 4
        $this->duration = $duration;
27 4
        $this->sequence = $sequence;
28 4
        $this->isDiscontinuity = $isDiscontinuity;
29 4
        $this->title = $title;
30
        $this->byterange = $byterange;
31 2
    }
32
33 2
    public function getUri()
34
    {
35
        return $this->uri;
36 2
    }
37
38 2
    public function getDuration()
39
    {
40
        return $this->duration;
41 2
    }
42
43 2
    public function getSequence()
44
    {
45
        return $this->sequence;
46 2
    }
47
48 2
    public function isDiscontinuity()
49
    {
50
        return $this->isDiscontinuity;
51 2
    }
52
53 2
    public function getTitle()
54
    {
55
        return $this->title;
56
    }
57
58
    public function getByterange()
59
    {
60
        return $this->byterange;
61
    }
62
}
63