| Total Complexity | 4 | 
| Total Lines | 27 | 
| Duplicated Lines | 0 % | 
| Changes | 3 | ||
| Bugs | 1 | Features | 0 | 
| 1 | <?php | ||
| 10 | class MorphCleanCommand extends Command | ||
| 11 | { | ||
| 12 | protected $signature = 'morph:clean | ||
| 13 |                                 {--dry-run : test clean}'; | ||
| 14 | |||
| 15 | protected $description = 'Clean break relations morph'; | ||
| 16 | |||
| 17 | public function handle() | ||
| 18 |     { | ||
| 19 | $this->captureEvents(); | ||
| 20 | |||
| 21 |         if ((new Morph())->cleanResidualAllModels($this->option('dry-run')) === 0) { | ||
|  | |||
| 22 |             $this->info("\tIt's already cleaned"); | ||
| 23 | } | ||
| 24 | } | ||
| 25 | |||
| 26 | protected function captureEvents() | ||
| 37 | )); | ||
| 38 | } | ||
| 42 |