| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2.108 |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | 1 | public function handle() |
|
| 32 | { |
||
| 33 | 1 | $config = App::make(Repository::class); |
|
| 34 | |||
| 35 | 1 | $indexPath = $config->get('search.index.path'); |
|
| 36 | |||
| 37 | 1 | $this->info('Destroying the search index.'); |
|
| 38 | |||
| 39 | 1 | if (File::isDirectory($indexPath)) { |
|
| 40 | File::deleteDirectory($indexPath); |
||
| 41 | $this->info('Search index is destroyed.'); |
||
| 42 | } else { |
||
| 43 | 1 | $this->comment('There was nothing to destroy? Try a rebuild.'); |
|
| 44 | } |
||
| 45 | 1 | } |
|
| 46 | } |
||
| 47 |