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

MediaSegment::couldTryNextLine()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
c 0
b 0
f 0
rs 9.4285
cc 3
eloc 6
nc 3
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