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

ObjectBuilder   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A addValue() 0 4 1
A setValue() 0 4 1
A getValue() 0 4 1
1
<?php
2
3
namespace Chrisyue\PhpM3u8\M3u8\Builder;
4
5
/**
6
 * @Annotation
7
 */
8
class ObjectBuilder extends AbstractBuilder
9
{
10
    public function addValue($key, $value)
11
    {
12
        array_push($this->getResult()->$key, $value);
13
    }
14
15
    public function setValue($key, $value)
16
    {
17
        $this->getResult()->$key = $value;
18
    }
19
20
    public function getValue($key)
21
    {
22
        return $this->getResult()->$key;
23
    }
24
}
25