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

MediaSegmentStrategy   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A shouldParseNextLine() 0 8 2
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