PathStackResolverServiceFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 14 2
1
<?php
2
3
namespace AssetManager\Core\Service;
4
5
use AssetManager\Core\Resolver\PathStackResolver;
6
use Psr\Container\ContainerInterface;
7
8
class PathStackResolverServiceFactory
9
{
10
    /**
11
     * @inheritDoc
12
     */
13
    public function __invoke(ContainerInterface $container)
14
    {
15
        $config            = $container->get('config');
16
        $pathStackResolver = new PathStackResolver();
17
        $paths             = array();
18
19
        if (isset($config['asset_manager']['resolver_configs']['paths'])) {
20
            $paths = $config['asset_manager']['resolver_configs']['paths'];
21
        }
22
23
        $pathStackResolver->addPaths($paths);
24
25
        return $pathStackResolver;
26
    }
27
}
28