Completed
Push — 2.0 ( 6cd6ae...d9081a )
by Rob
11s
created

AbstractResolverFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 19
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 Liip\ImagineBundle\DependencyInjection\Factory\ChildDefinitionTrait;
15
use Liip\ImagineBundle\DependencyInjection\Factory\Resolver\ResolverFactoryInterface;
16
use Symfony\Component\DependencyInjection\ChildDefinition;
17
use Symfony\Component\DependencyInjection\DefinitionDecorator;
18
19
abstract class AbstractResolverFactory implements ResolverFactoryInterface
20
{
21
    use ChildDefinitionTrait;
22
23
    /**
24
     * @var string
25
     */
26
    protected static $namePrefix = 'liip_imagine.cache.resolver';
27
28
    /**
29
     * @param string|null $name
30
     *
31
     * @return ChildDefinition|DefinitionDecorator
32
     */
33
    final protected function getChildResolverDefinition($name = null)
34
    {
35
        return $this->getChildDefinition(sprintf('%s.prototype.%s', static::$namePrefix, $name ?: $this->getName()));
36
    }
37
}
38