Completed
Push — develop ( 99c8cd...370699 )
by Baptiste
02:34
created

RangeExtractorFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

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\ServerBundle\RangeExtractor\{
7
    DelegationExtractor,
8
    ExtractorInterface
9
};
10
use Innmind\Immutable\Set;
11
12
final class RangeExtractorFactory
13
{
14
    public function make(array $extractors): DelegationExtractor
15
    {
16
        $set = new Set(ExtractorInterface::class);
17
18
        foreach ($extractors as $extractor) {
19
            $set = $set->add($extractor);
20
        }
21
22
        return new DelegationExtractor($set);
23
    }
24
}
25