Completed
Pull Request — develop (#27)
by Chris
02:25
created

MediaSegmentStrategy::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
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 1
1
<?php
2
3
namespace Chrisyue\PhpM3u8\Parser\Strategy;
4
5
use Chrisyue\PhpM3u8\DataAccessor\DataAccessorInterface;
6
7
/**
8
 * @Annotation
9
 */
10
class MediaSegmentStrategy implements StrategyInterface
11
{
12
    public function shouldParseNextLine(DataAccessorInterface $dataAccessor)
13
    {
14
        if (!$dataAccessor->isChanged()) {
15
            return false;
16
        }
17
18
        return null === $dataAccessor->get('uri');
19
    }
20
}
21