1 | <?php |
||
17 | final class StorageMetadataFactory implements StorageMetadataFactoryInterface |
||
18 | { |
||
19 | /** |
||
20 | * {@inheritDoc} |
||
21 | */ |
||
22 | public function createInstance(array $mapping) |
||
34 | |||
35 | /** |
||
36 | * {@inheritDoc} |
||
37 | */ |
||
38 | public function handleLoad(EntityMetadata $metadata) |
||
41 | |||
42 | /** |
||
43 | * {@inheritDoc} |
||
44 | */ |
||
45 | public function handleValidate(EntityMetadata $metadata) |
||
49 | |||
50 | |||
51 | } |
||
52 |
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.