1 | <?php |
||
9 | class ConfigurationTest extends AbstractTest |
||
10 | { |
||
11 | /** |
||
12 | * Some basic tests to make sure the configuration is correctly processed in |
||
13 | * the standard case. |
||
14 | */ |
||
15 | public function testProcessSimpleCase() |
||
35 | |||
36 | /** |
||
37 | * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException |
||
38 | */ |
||
39 | public function testInvalidSiteUrl() |
||
49 | |||
50 | /** |
||
51 | * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException |
||
52 | */ |
||
53 | public function testInvalidRedirectCode() |
||
63 | |||
64 | /** |
||
65 | * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException |
||
66 | */ |
||
67 | public function testInvalidRedirect() |
||
77 | |||
78 | /** |
||
79 | * Processes an array of configurations and returns a compiled version. |
||
80 | * |
||
81 | * @param array $configs An array of raw configurations |
||
82 | * |
||
83 | * @return array A normalized array |
||
84 | */ |
||
85 | protected function process($configs) |
||
91 | } |
||
92 |
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.