| 1 | <?php |
||
| 10 | class ConsoleOutputStream extends OutputStream |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * constructor |
||
| 14 | */ |
||
| 15 | public function __construct() |
||
| 19 | |||
| 20 | /** |
||
| 21 | * {@inheritdoc} |
||
| 22 | */ |
||
| 23 | public function write($buf, int $off = null, int $len = null) |
||
| 38 | |||
| 39 | /** |
||
| 40 | * {@inheritdoc} |
||
| 41 | */ |
||
| 42 | public function close() |
||
| 46 | |||
| 47 | /** |
||
| 48 | * {@inheritdoc} |
||
| 49 | */ |
||
| 50 | public function flush() |
||
| 54 | } |
||
| 55 |
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.