Completed
Pull Request — develop (#27)
by Chris
01:52
created

MediaSegment   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 6
dl 0
loc 20
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A createParser() 0 9 1
A createDumper() 0 3 1
1
<?php
2
3
namespace Chrisyue\PhpM3u8\PdFactory\Annotation;
4
5
use Chrisyue\PhpM3u8\Parser\ParentChildParser;
6
use Chrisyue\PhpM3u8\Document\Rfc8216\MediaSegment as MediaSegmentDoc;
7
use Chrisyue\PhpM3u8\DataAccessor\ObjectAccessor;
8
use Chrisyue\PhpM3u8\Parser\Strategy\MediaSegmentStrategy;
9
use Chrisyue\PhpM3u8\Parser\Parsers;
10
use Chrisyue\PhpM3u8\PdFactory\AbstractParentAnnotReadableFactory;
11
12
/**
13
 * @Annotation
14
 */
15
class MediaSegment extends AbstractParentAnnotReadableFactory
16
{
17
    public function __construct(array $options)
0 ignored issues
show
Unused Code introduced by
The parameter $options is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
18
    {
19
    }
20
21
    public function createParser()
22
    {
23
        return new ParentChildParser(
24
            $this->initParsers(new Parsers(), MediaSegmentDoc::class),
0 ignored issues
show
Bug introduced by
The method initParsers() does not seem to exist on object<Chrisyue\PhpM3u8\...nnotation\MediaSegment>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
25
            new ObjectAccessor(new MediaSegmentDoc()),
26
            new MediaSegmentStrategy(),
27
            true
28
        );
29
    }
30
31
    public function createDumper()
32
    {
33
    }
34
}
35