AbstractUtilityTwigExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the bootstrap-bundle package.
5
 *
6
 * (c) 2018 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\BootstrapBundle\Twig\Extension\Utility;
13
14
use Twig\Environment;
15
use WBW\Bundle\BootstrapBundle\Twig\Extension\AbstractTwigExtension;
16
use WBW\Bundle\CoreBundle\Component\Translation\BaseTranslatorInterface;
17
use WBW\Bundle\CoreBundle\Service\TranslatorTrait;
18
19
/**
20
 * Abstract utility Twig extension.
21
 *
22
 * @author webeweb <https://github.com/webeweb/>
23
 * @package WBW\Bundle\BootstrapBundle\Twig\Extension\Utility
24
 * @abstract
25
 */
26
abstract class AbstractUtilityTwigExtension extends AbstractTwigExtension {
27
28
    use TranslatorTrait;
29
30
    /**
31
     * Constructor.
32
     *
33
     * @param Environment $twigEnvironment The Twig environment.
34
     * @param BaseTranslatorInterface $translator The translator.
35
     */
36
    public function __construct(Environment $twigEnvironment, $translator) {
37
        parent::__construct($twigEnvironment);
38
        $this->setTranslator($translator);
39
    }
40
}
41