CollectionResolverServiceFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

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