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

StreamInf   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A parse() 0 14 2
1
<?php
2
3
namespace Chrisyue\PhpM3u8\M3u8\Core;
4
5
/**
6
 * @Annotation
7
 * @Target("PROPERTY")
8
 */
9
class StreamInf extends Tag
10
{
11
    public function parse()
12
    {
13
        $result = parent::parse();
14
15
        if (null === $result) {
16
            return;
17
        }
18
19
        $this->getStream()->next();
20
        $lineInfo = $this->getStream()->read();
21
        $result->uri = $lineInfo['value'];
22
23
        return $result;
24
    }
25
}
26