Passed
Pull Request — master (#47)
by
unknown
14:22
created

EnumRowItemBuilder   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 4
c 1
b 1
f 0
dl 0
loc 8
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 0 6 1
1
<?php
2
declare(strict_types=1);
3
4
namespace hipanel\rbac\console\converter\formatter;
5
6
class EnumRowItemBuilder extends DefaultEnumRowItemBuilder
7
{
8
    public function build(string $value): string
9
    {
10
        [,$newValue] = explode(':', $value);
11
        $key = $this->toCamelCase($newValue);
12
13
        return $this->renderKeyValue($key, $value);
14
    }
15
}
16