Completed
Pull Request — develop (#27)
by Chris
11:06
created

AbstractConfigurable   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getClass() 0 4 1
A getOption() 0 4 1
1
<?php
2
3
namespace Chrisyue\PhpM3u8\M3u8\AnnotationReadable;
4
5
abstract class AbstractConfigurable extends AbstractAnnotationReadable
6
{
7
    private $options;
8
9
    public function __construct(array $options)
10
    {
11
        $this->options = $options;
12
    }
13
14
    protected function getClass()
15
    {
16
        return $this->options['class'];
17
    }
18
19
    protected function getOption($name)
20
    {
21
        return $this->options[$name];
22
    }
23
}
24