| 1 | <?php |
||
| 12 | class ReflectionFileFactory extends ReflectorFactory |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $filename; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var int |
||
| 21 | */ |
||
| 22 | protected $i = 0; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var array |
||
| 26 | */ |
||
| 27 | protected $tokens; |
||
| 28 | |||
| 29 | 6 | public function __construct(string $filename) |
|
| 35 | |||
| 36 | 6 | public function build() |
|
| 42 | |||
| 43 | 6 | public function parseFile() |
|
| 122 | } |
||
| 123 |
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.