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

ParentChildDumper   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 28
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
A isRepeatable() 0 4 1
A getSequence() 0 4 1
1
<?php
2
3
namespace Chrisyue\PhpM3u8\Dumper;
4
5
use Chrisyue\PhpM3u8\DataAccessor\FactoryInterface;
6
7
class ParentChildDumper extends ParentDumper implements ChildDumperInterface
8
{
9
    private $repeatable;
10
11
    private $sequence;
12
13
    public function __construct(
14
        FactoryInterface $dataAccessorFactory,
15
        array $children,
16
        $sequence,
17
        $repeatable = false
18
    ) {
19
        parent::__construct($dataAccessorFactory, $children);
20
21
        $this->sequence = $sequence;
22
        $this->repeatable = $repeatable;
23
    }
24
25
    public function isRepeatable()
26
    {
27
        return $this->repeatable;
28
    }
29
30
    public function getSequence()
31
    {
32
        return $this->sequence;
33
    }
34
}
35