@@ -6,9 +6,9 @@ |
||
| 6 | 6 | { |
| 7 | 7 | protected $string; |
| 8 | 8 | protected $field = false; |
| 9 | - protected $Options = []; |
|
| 9 | + protected $Options = [ ]; |
|
| 10 | 10 | |
| 11 | - public function __construct($string, $field = false, $options = []) |
|
| 11 | + public function __construct($string, $field = false, $options = [ ]) |
|
| 12 | 12 | { |
| 13 | 13 | $this->string = $string; |
| 14 | 14 | $this->field = $field; |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | * |
| 31 | 31 | * @param bool $path |
| 32 | 32 | * @param bool $forceCreate |
| 33 | - * @return \ZendSearch\Lucene\SearchIndexInterface |
|
| 33 | + * @return Index |
|
| 34 | 34 | * @throws ExceptionInterface |
| 35 | 35 | * @throws \Exception |
| 36 | 36 | */ |
@@ -18,13 +18,13 @@ discard block |
||
| 18 | 18 | protected $name = 'search:rebuild'; |
| 19 | 19 | protected $description = 'Rebuild the search index'; |
| 20 | 20 | |
| 21 | - private $models = []; |
|
| 21 | + private $models = [ ]; |
|
| 22 | 22 | |
| 23 | 23 | public function getModels() |
| 24 | 24 | { |
| 25 | 25 | foreach (get_declared_classes() as $class) { |
| 26 | 26 | if (is_subclass_of($class, Model::class) && method_exists($class, 'searchFields')) { |
| 27 | - $this->models[] = $class; |
|
| 27 | + $this->models[ ] = $class; |
|
| 28 | 28 | } |
| 29 | 29 | } |
| 30 | 30 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | $this->output = new NullOutput; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - $this->call('search:destroy', ['--verbose' => $this->option('verbose')]); |
|
| 40 | + $this->call('search:destroy', [ '--verbose' => $this->option('verbose') ]); |
|
| 41 | 41 | |
| 42 | 42 | $store = App::make(Store::class); |
| 43 | 43 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | $object->chunk(1000, function($chunk) use ($progress, $store) { |
| 63 | 63 | foreach ($chunk as $record) { |
| 64 | - $store->model($record); // @todo move this to the insertmodel method |
|
| 64 | + $store->model($record); // @todo move this to the insertmodel method |
|
| 65 | 65 | $store->insertModel($record, false); |
| 66 | 66 | $progress->advance(); |
| 67 | 67 | } |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | $this->info(PHP_EOL); |
| 75 | 75 | |
| 76 | - $this->call('search:optimise', ['--verbose' => $this->option('verbose')]); |
|
| 76 | + $this->call('search:optimise', [ '--verbose' => $this->option('verbose') ]); |
|
| 77 | 77 | |
| 78 | 78 | $this->info(PHP_EOL . 'Search engine rebuild complete.'); |
| 79 | 79 | } |