Completed
Push — master ( ddcd57...befb63 )
by Adam
12:31
created

Optimise   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 13
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 7 1
1
<?php
2
3
namespace BestServedCold\LaravelZendSearch\Laravel\Console;
4
5
use BestServedCold\LaravelZendSearch\Laravel\Index;
6
use Illuminate\Console\Command;
7
use Illuminate\Support\Facades\App;
8
9
/**
10
 * Class OptimiseCommand
11
 * @package BestServedCold\LaravelZendSearch\Laravel\Console
12
 */
13
class Optimise extends Command
14
{
15
    protected $name = 'search:optimise';
16
    protected $description = 'Optimise the search index storage.';
17
18 4
    public function handle()
19
    {
20 4
        $this->info('Optimising search index.');
21 4
        $index = App::make(Index::class);
22 4
        $index->open()->get()->optimize();
23 4
        $this->info('Optimising finished.');
24 4
    }
25
}
26