Completed
Push — master ( 045f74...468866 )
by WEBEWEB
02:14
created

AbstractTwigExtension   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 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;
13
14
use Twig\Environment;
15
use WBW\Bundle\CoreBundle\Twig\Extension\AbstractTwigExtension as BaseTwigExtension;
16
17
/**
18
 * Abstract Twig extension.
19
 *
20
 * @author webeweb <https://github.com/webeweb/>
21
 * @package WBW\Bundle\BootstrapBundle\Twig\Extension
22
 * @abstract
23
 */
24
abstract class AbstractTwigExtension extends BaseTwigExtension {
25
26
    /**
27
     * Constructor.
28
     *
29
     * @param Environment $twigEnvironment The Twig environment.
30
     */
31
    public function __construct(Environment $twigEnvironment) {
32
        parent::__construct($twigEnvironment);
0 ignored issues
show
Compatibility introduced by
$twigEnvironment of type object<Twig\Environment> is not a sub-type of object<Twig_Environment>. It seems like you assume a child class of the class Twig\Environment to be always present.

This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.

Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.

Loading history...
33
    }
34
}
35