| 1 | <?php namespace Wn\Generators\Commands; |
||
| 6 | class ControllerCommand extends BaseCommand { |
||
| 7 | |||
| 8 | protected $signature = 'wn:controller |
||
| 9 | {model : Name of the model (with namespace if not App)} |
||
| 10 | {--no-routes= : without routes} |
||
| 11 | {--force= : override the existing files} |
||
| 12 | {--laravel : Use Laravel style route definitions} |
||
| 13 | '; |
||
| 14 | |||
| 15 | protected $description = 'Generates RESTful controller using the RESTActions trait'; |
||
| 16 | |||
| 17 | public function handle() |
||
| 50 | |||
| 51 | } |
||
| 52 |
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.