| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function handle() |
||
| 21 | { |
||
| 22 | $config = App::make(Repository::class); |
||
| 23 | |||
| 24 | $indexPath = $config->get('search.index.path'); |
||
| 25 | |||
| 26 | $this->info('Destroying the search index.'); |
||
| 27 | |||
| 28 | if (File::isDirectory($indexPath)) { |
||
| 29 | File::deleteDirectory($indexPath); |
||
| 30 | $this->info('Search index is destroyed.'); |
||
| 31 | } else { |
||
| 32 | $this->comment('There was nothing to destroy? Try a rebuild.'); |
||
| 33 | } |
||
| 34 | } |
||
| 35 | } |
||
| 36 |