Completed
Push — master ( a73fad...f8ec74 )
by Baptiste
02:31
created

RangeExtractorFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A make() 0 10 2
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\Rest\ServerBundle\Factory;
5
6
use Innmind\Rest\Server\RangeExtractor\{
7
    DelegationExtractor,
8
    ExtractorInterface
9
};
10
use Innmind\Immutable\Set;
11
12
final class RangeExtractorFactory
13
{
14 5
    public function make(array $extractors): DelegationExtractor
15
    {
16 5
        $set = new Set(ExtractorInterface::class);
17
18 5
        foreach ($extractors as $extractor) {
19 5
            $set = $set->add($extractor);
20
        }
21
22 5
        return new DelegationExtractor($set);
23
    }
24
}
25