1 | <?php |
||
26 | trait EmailTrait |
||
27 | { |
||
28 | /** |
||
29 | * @var string a valid email |
||
30 | */ |
||
31 | protected $email; |
||
32 | |||
33 | /** |
||
34 | * @param string $value the email |
||
35 | * |
||
36 | * @throws InvalidConfigException |
||
37 | */ |
||
38 | public function setEmail($value) |
||
48 | |||
49 | /** |
||
50 | * @return string the email |
||
51 | */ |
||
52 | public function getEmail() |
||
56 | } |
||
57 |
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.