| 1 | <?php |
||
| 19 | abstract class AbstractCommand extends BaseCommand |
||
| 20 | { |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Prepare dependencies. |
||
| 24 | * |
||
| 25 | * @return void |
||
| 26 | */ |
||
| 27 | protected function prepareDependencies() |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Returns and validates path. |
||
| 34 | * |
||
| 35 | * @param string $argument_name Argument name, that contains path. |
||
| 36 | * |
||
| 37 | * @return string |
||
| 38 | * @throws \InvalidArgumentException When path isn't valid. |
||
| 39 | */ |
||
| 40 | protected function getPath($argument_name) |
||
| 56 | |||
| 57 | } |
||
| 58 |
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.