ScheduledMediaSegment   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 47
ccs 0
cts 15
cp 0
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 16 1
A getProgram() 0 4 1
A getChannel() 0 4 1
A getStartsAt() 0 4 1
A getEndsAt() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the Mala 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\Mala\Model;
13
14
use Chrisyue\PhpM3u8\M3u8\MediaSegment\MediaSegment;
15
16
class ScheduledMediaSegment extends MediaSegment
17
{
18
    protected $program;
19
20
    protected $channel;
21
22
    protected $startsAt;
23
24
    protected $endsAt;
25
26
    public function __construct(
27
        ProgramInterface $program,
28
        \DateTime $startsAt,
29
        \DateTime $endsAt,
30
        $uri,
31
        $duration,
32
        $sequence,
33
        $isDiscontinuity
34
    ) {
35
        $this->program = $program;
36
        $this->channel = $program->getChannel();
37
        $this->startsAt = $startsAt;
38
        $this->endsAt = $endsAt;
39
40
        parent::__construct($uri, $duration, $sequence, $isDiscontinuity);
41
    }
42
43
    public function getProgram()
44
    {
45
        return $this->program;
46
    }
47
48
    public function getChannel()
49
    {
50
        return $this->channel;
51
    }
52
53
    public function getStartsAt()
54
    {
55
        return $this->startsAt;
56
    }
57
58
    public function getEndsAt()
59
    {
60
        return $this->endsAt;
61
    }
62
}
63