| 1 | <?php |
||
| 8 | class BootstrapTest extends Test |
||
| 9 | { |
||
| 10 | public $mocks = [ |
||
| 11 | ['event.subscribe', [], 'subscription'], |
||
| 12 | ['web.register', [], 'registration'], |
||
| 13 | ]; |
||
| 14 | |||
| 15 | public function test() |
||
| 34 | |||
| 35 | |||
| 36 | private $registrations = []; |
||
| 37 | public function registration($params) |
||
| 41 | |||
| 42 | private $subscriptions = []; |
||
| 43 | public function subscription($params) |
||
| 47 | } |
||
| 48 |
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.