__invoke()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 13
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 7
nc 2
nop 1
1
<?php
2
3
namespace AssetManager\Core\Service;
4
5
use AssetManager\Core\Resolver\PrivateCollectionResolver;
6
use Psr\Container\ContainerInterface;
7
8
class PrivateCollectionResolverServiceFactory
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']['private_collections'])) {
19
            $collections = $config['asset_manager']['resolver_configs']['private_collections'];
20
        }
21
22
        $privateCollectionResolver = new PrivateCollectionResolver($collections);
23
24
        return $privateCollectionResolver;
25
    }
26
}
27