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 ONGR package. |
||
5 | * |
||
6 | * (c) NFQ Technologies UAB <[email protected]> |
||
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 ONGR\SettingsBundle; |
||
13 | |||
14 | use ONGR\SettingsBundle\DependencyInjection\Compiler\EnvironmentVariablesPass; |
||
15 | use ONGR\SettingsBundle\DependencyInjection\Compiler\ProviderPass; |
||
16 | use ONGR\SettingsBundle\DependencyInjection\Compiler\SettingsModifierPass; |
||
17 | use ONGR\SettingsBundle\DependencyInjection\Compiler\SettingAwareFactoryPass; |
||
18 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
||
19 | use Symfony\Component\HttpKernel\Bundle\Bundle; |
||
20 | use ONGR\SettingsBundle\DependencyInjection\Security\SessionlessAuthenticationFactory; |
||
21 | |||
22 | /** |
||
23 | * This class is used to register component into Symfony app kernel. |
||
24 | */ |
||
25 | class ONGRSettingsBundle extends Bundle |
||
26 | { |
||
27 | /** |
||
28 | * {@inheritdoc} |
||
29 | */ |
||
30 | public function build(ContainerBuilder $container) |
||
31 | { |
||
32 | parent::build($container); |
||
33 | |||
34 | $container->addCompilerPass(new EnvironmentVariablesPass()); |
||
35 | $container->addCompilerPass(new ProviderPass()); |
||
36 | $container->addCompilerPass(new SettingsModifierPass()); |
||
37 | $container->addCompilerPass(new SettingAwareFactoryPass()); |
||
38 | |||
39 | $extension = $container->getExtension('security'); |
||
0 ignored issues
–
show
|
|||
40 | } |
||
41 | } |
||
42 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.