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

KvReverser   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A reverse() 0 9 2
1
<?php
2
3
namespace Chrisyue\PhpM3u8\Transformer;
4
5
class KvReverser implements ReverserInterface
6
{
7
    public function reverse($attributes)
8
    {
9
        $attrs = [];
10
        foreach ($attributes as $key => $val) {
11
            $attrs[] = sprintf('%s=%s', $key, $val);
12
        }
13
14
        return implode(',', $attrs);
15
    }
16
}
17