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

MediaSegment   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 20
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSequence() 0 4 1
A couldTryNextLine() 0 12 3
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