getChildResolverDefinition()   A
last analyzed

Complexity

Conditions 2
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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