Completed
Pull Request — develop (#27)
by Chris
20:10 queued 05:10
created

MediaSegment::getSequence()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Chrisyue\PhpM3u8\M3u8\AnnotationReadable;
4
5
use Chrisyue\PhpM3u8\M3u8\M3u8Interface;
6
use Chrisyue\PhpM3u8\M3u8\SequenceAwareInterface;
7
8
/**
9
 * @Annotation
10
 * @Target("PROPERTY")
11
 */
12
class MediaSegment extends AbstractConfigurable implements SequenceAwareInterface
13
{
14
    public function getSequence()
15
    {
16
        return $this->getOption('sequence');
17
    }
18
19
    protected function couldTryNextLine()
20
    {
21
        if (null === $this->getResult()) {
22
            return false;
23
        }
24
25
        if (null !== $this->getResult()->uri) {
26
            return false;
27
        }
28
29
        return true;
30
    }
31
}
32