MapFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 11
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A make() 0 9 2
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\Neo4jBundle\Factory;
5
6
use Innmind\Immutable\Map;
7
8
final class MapFactory
9
{
10 10
    public static function make(string $class, string $type, array $elements)
11
    {
12 10
        $map = new Map('string', $type);
13
14 10
        foreach ($elements as $key => $element) {
15 10
            $map = $map->put($key, $element);
16
        }
17
18 10
        return new $class($map);
19
    }
20
}
21