Completed
Push — develop ( a73fad...2d5c57 )
by Baptiste
10:58
created

DirectoriesFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A make() 0 4 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\Rest\ServerBundle\Factory;
5
6
use Innmind\Rest\Server\Definition\LoaderInterface;
7
use Innmind\Immutable\{
8
    Map,
9
    SetInterface,
10
    MapInterface
11
};
12
13
final class DirectoriesFactory
14
{
15
    private $loader;
16
17
    public function __construct(LoaderInterface $loader)
18
    {
19
        $this->loader = $loader;
20
    }
21
22
    /**
23
     * @param SetInterface<string> $files
0 ignored issues
show
Documentation introduced by
The doc-type SetInterface<string> could not be parsed: Expected "|" or "end of type", but got "<" at position 12. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
24
     *
25
     * @return MapInterface<string, Directory>
0 ignored issues
show
Documentation introduced by
The doc-type MapInterface<string, could not be parsed: Expected "|" or "end of type", but got "<" at position 12. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
26
     */
27
    public function make(SetInterface $files): MapInterface
28
    {
29
        return $this->loader->load($files);
30
    }
31
}
32