Completed
Pull Request — develop (#27)
by Chris
12:16
created

MediaSegment::shouldParseNextLine()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
c 0
b 0
f 0
rs 9.4285
cc 2
eloc 4
nc 2
nop 2
1
<?php
2
3
namespace Chrisyue\PhpM3u8\M3u8\Core;
4
5
/**
6
 * @Annotation
7
 * @Target("PROPERTY")
8
 */
9
class MediaSegment extends AbstractAnnotationReadable implements ChildCoreInterface
10
{
11
    public function getSequence()
12
    {
13
        return $this->getOption('sequence');
14
    }
15
16
    protected function shouldParseNextLine($result, $parsedSequence)
17
    {
18
        if ($parsedSequence < 0) {
19
            return false;
20
        }
21
22
        return null === $result->uri;
23
    }
24
}
25