AssetCacheManagerServiceFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 12 2
1
<?php
2
3
namespace AssetManager\Core\Service;
4
5
use Psr\Container\ContainerInterface;
6
7
/**
8
 * Factory for the Asset Cache Manager Service
9
 */
10
class AssetCacheManagerServiceFactory
11
{
12
    /**
13
     * @inheritDoc
14
     */
15
    public function __invoke(ContainerInterface $container)
16
    {
17
        $config = array();
18
19
        $globalConfig = $container->get('config');
20
21
        if (!empty($globalConfig['asset_manager']['caching'])) {
22
            $config = $globalConfig['asset_manager']['caching'];
23
        }
24
25
        return new AssetCacheManager($container, $config);
26
    }
27
}
28