@@ -59,7 +59,7 @@ |
||
| 59 | 59 | |
| 60 | 60 | $status = $synchronizer->analyse($index); |
| 61 | 61 | $description = $status->toHumanString(); |
| 62 | - if (! $status->bothAreEqual()) { |
|
| 62 | + if ( ! $status->bothAreEqual()) { |
|
| 63 | 63 | $description = "<fg=red>$description</>"; |
| 64 | 64 | } else { |
| 65 | 65 | $description = '<fg=green>Synchronized</>'; |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | foreach ($searchableFinder->fromCommand($this) as $searchable) { |
| 43 | 43 | $this->call('scout:flush', ['searchable' => $searchable]); |
| 44 | 44 | |
| 45 | - $events->listen(ModelsImported::class, function ($event) use ($searchable) { |
|
| 45 | + $events->listen(ModelsImported::class, function($event) use ($searchable) { |
|
| 46 | 46 | $this->resultMessage($event->models, $searchable); |
| 47 | 47 | }); |
| 48 | 48 | |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | { |
| 90 | 90 | $parts = explode(self::$separator, $objectId); |
| 91 | 91 | |
| 92 | - if (! is_array($parts) || count($parts) < 2) { |
|
| 92 | + if ( ! is_array($parts) || count($parts) < 2) { |
|
| 93 | 93 | throw new ShouldReimportSearchableException('ObjectID seems invalid. You may need to |
| 94 | 94 | re-import your data using the `scout-reimport` Artisan command.'); |
| 95 | 95 | } |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | */ |
| 103 | 103 | public function whereIn($field, array $values): self |
| 104 | 104 | { |
| 105 | - $wheres = array_map(function ($value) use ($field) { |
|
| 105 | + $wheres = array_map(function($value) use ($field) { |
|
| 106 | 106 | return "$field={$this->transform($value)}"; |
| 107 | 107 | }, array_values($values)); |
| 108 | 108 | |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | { |
| 125 | 125 | $callback = $this->callback; |
| 126 | 126 | |
| 127 | - $this->callback = function ($algolia, $query, $baseParameters) use ($parameters, $callback) { |
|
| 127 | + $this->callback = function($algolia, $query, $baseParameters) use ($parameters, $callback) { |
|
| 128 | 128 | $parameters = array_merge($parameters, $baseParameters); |
| 129 | 129 | |
| 130 | 130 | if (is_callable($callback)) { |
@@ -109,8 +109,8 @@ |
||
| 109 | 109 | { |
| 110 | 110 | $operators = ['<', '<=', '=', '!=', '>=', '>', ':']; |
| 111 | 111 | |
| 112 | - return collect($builder->wheres)->map(function ($value, $key) use ($operators) { |
|
| 113 | - if (! is_array($value)) { |
|
| 112 | + return collect($builder->wheres)->map(function($value, $key) use ($operators) { |
|
| 113 | + if ( ! is_array($value)) { |
|
| 114 | 114 | if (Str::endsWith($key, $operators) || Str::startsWith($value, $operators)) { |
| 115 | 115 | return $key.' '.$value; |
| 116 | 116 | } |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | return config_path($fileName); |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - if (! $this->files->exists($settingsPath)) { |
|
| 80 | + if ( ! $this->files->exists($settingsPath)) { |
|
| 81 | 81 | $this->files->makeDirectory($settingsPath, 0755, true); |
| 82 | 82 | } |
| 83 | 83 | |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | |
| 55 | 55 | $result = $index->deleteBy([ |
| 56 | 56 | 'tagFilters' => [ |
| 57 | - $this->searchables->map(function ($searchable) { |
|
| 57 | + $this->searchables->map(function($searchable) { |
|
| 58 | 58 | return ObjectIdEncrypter::encrypt($searchable); |
| 59 | 59 | })->toArray(), |
| 60 | 60 | ], |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | foreach ($searchableFinder->fromCommand($this) as $searchable) { |
| 47 | 47 | $this->output->text(' |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | foreach ($hits->keys() as $id) { |
| 53 | 53 | $modelClass = ObjectIdEncrypter::decryptSearchable($id); |
| 54 | 54 | $modelKey = ObjectIdEncrypter::decryptSearchableKey($id); |
| 55 | - if (! array_key_exists($modelClass, $models)) { |
|
| 55 | + if ( ! array_key_exists($modelClass, $models)) { |
|
| 56 | 56 | $models[$modelClass] = []; |
| 57 | 57 | } |
| 58 | 58 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $model = new $modelClass; |
| 64 | 64 | |
| 65 | 65 | if (in_array(Searchable::class, class_uses_recursive($model), true)) { |
| 66 | - if (! empty($models = $model->getScoutModelsByIds($builder, $modelKeys))) { |
|
| 66 | + if ( ! empty($models = $model->getScoutModelsByIds($builder, $modelKeys))) { |
|
| 67 | 67 | $instances = $instances->merge($models); |
| 68 | 68 | } |
| 69 | 69 | } else { |