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

getChildResolverDefinition()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 2
eloc 2
nc 1
nop 1
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