AbstractResolverFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getChildResolverDefinition() 0 4 2
1
<?php
2
3
/*
4
 * This file is part of the `liip/LiipImagineBundle` project.
5
 *
6
 * (c) https://github.com/liip/LiipImagineBundle/graphs/contributors
7
 *
8
 * For the full copyright and license information, please view the LICENSE.md
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Liip\ImagineBundle\DependencyInjection\Factory\Resolver;
13
14
use Symfony\Component\DependencyInjection\ChildDefinition;
15
16
abstract class AbstractResolverFactory implements ResolverFactoryInterface
17
{
18
    /**
19
     * @var string
20
     */
21
    protected static $namePrefix = 'liip_imagine.cache.resolver';
22
23
    /**
24
     * @param string|null $name
25
     *
26
     * @return ChildDefinition
27
     */
28
    final protected function getChildResolverDefinition($name = null)
29
    {
30
        return new ChildDefinition(sprintf('%s.prototype.%s', static::$namePrefix, $name ?: $this->getName()));
31
    }
32
}
33