| 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
$myVarassignment in line 1 and the$higherassignment in line 2 are dead. The first because$myVaris never used and the second because$higheris always overwritten for every possible time line.