Completed
Branch master (468866)
by WEBEWEB
01:51
created

Twig/Extension/AbstractTwigExtension.php (1 issue)

Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

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
$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