| 1 | <?php |
||
| 9 | class RouteController |
||
| 10 | { |
||
| 11 | /** @var array */ |
||
| 12 | protected static $param = []; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Format string and split into layers |
||
| 16 | * @param $param |
||
| 17 | * @return mixed |
||
| 18 | */ |
||
| 19 | public static function format($param) |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Return class name |
||
| 26 | * |
||
| 27 | * @return string |
||
| 28 | */ |
||
| 29 | public static function getClass() : string |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Retorna method name |
||
| 36 | * |
||
| 37 | * @return string |
||
| 38 | */ |
||
| 39 | public static function getMethod(): string |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param $param |
||
| 46 | * @return array |
||
| 47 | */ |
||
| 48 | public static function prepare($param) |
||
| 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.