| Total Complexity | 5 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 9 | class RemoveDuplicatedGuardians extends Command |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * The name and signature of the console command. |
||
| 13 | * |
||
| 14 | * @var string |
||
| 15 | */ |
||
| 16 | protected $signature = 'clean:guardian'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * The console command description. |
||
| 20 | * |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | protected $description = 'Command description'; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Create a new command instance. |
||
| 27 | * |
||
| 28 | * @return void |
||
| 29 | */ |
||
| 30 | public function __construct() |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Execute the console command. |
||
| 37 | * |
||
| 38 | * @return mixed |
||
| 39 | */ |
||
| 40 | public function handle() |
||
| 41 | { |
||
| 42 | try { |
||
| 43 | $this->start_time = microtime(TRUE); |
||
|
|
|||
| 44 | $this->output = new \Symfony\Component\Console\Output\ConsoleOutput(); |
||
| 45 | $this->output->writeln('############### Starting delete Duplication ################'); |
||
| 46 | Student_guardian::withTrashed()->restore(); |
||
| 47 | $this->delete(); |
||
| 48 | $this->end_time = microtime(TRUE); |
||
| 49 | $this->output->writeln('The cook took ' . ($this->end_time - $this->start_time) . ' seconds to complete'); |
||
| 50 | } catch (\Throwable $th) { |
||
| 51 | } |
||
| 52 | } |
||
| 53 | |||
| 54 | public function delete(){ |
||
| 65 | } |
||
| 66 | } |
||
| 68 |