Skip to content

Commit

Permalink
Run CS fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony BOTALLA committed Jun 30, 2021
1 parent 5edc7af commit bc9bb0a
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 8 deletions.
6 changes: 6 additions & 0 deletions src/Builders/FilterBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public function where($field, $value)
$field => $value,
],
];

break;

case '>':
Expand All @@ -112,6 +113,7 @@ public function where($field, $value)
],
],
];

break;

case '<':
Expand All @@ -122,6 +124,7 @@ public function where($field, $value)
],
],
];

break;

case '>=':
Expand All @@ -132,6 +135,7 @@ public function where($field, $value)
],
],
];

break;

case '<=':
Expand All @@ -142,6 +146,7 @@ public function where($field, $value)
],
],
];

break;

case '!=':
Expand All @@ -151,6 +156,7 @@ public function where($field, $value)
$field => $value,
],
];

break;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Console/ElasticIndexCreateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function handle()

collect(config('scout_elastic.searchable_models', []))
->filter(function ($indexableClass) {
$model = new $indexableClass;
$model = new $indexableClass();

return method_exists($model, 'getIndexConfigurator') && get_class($model->getIndexConfigurator()) === get_class($this->configurator);
})->each(function ($class) {
Expand Down
4 changes: 2 additions & 2 deletions src/Console/Features/RequiresIndexConfiguratorArgument.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected function getIndexConfigurator()
{
$configuratorClass = trim($this->argument('index-configurator'));

$configuratorInstance = new $configuratorClass;
$configuratorInstance = new $configuratorClass();

if (! ($configuratorInstance instanceof IndexConfigurator)) {
throw new InvalidArgumentException(sprintf(
Expand All @@ -26,6 +26,6 @@ protected function getIndexConfigurator()
));
}

return new $configuratorClass;
return new $configuratorClass();
}
}
2 changes: 1 addition & 1 deletion src/Console/Features/RequiresModelArgument.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ protected function getModel()
{
$modelClass = trim($this->argument('model'));

$modelInstance = new $modelClass;
$modelInstance = new $modelClass();

if (
! ($modelInstance instanceof Model) ||
Expand Down
1 change: 1 addition & 0 deletions src/Indexers/BulkIndexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public function update(Collection $models)
$model = $models->first();
$indexConfigurator = $model->getIndexConfigurator();
$this->configurator = $indexConfigurator;

try {
// Use name of new index created by elastic:create-index command
$indexName = resolve('elasticIndexCreated');
Expand Down
6 changes: 3 additions & 3 deletions src/Searchable.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function getIndexConfigurator()
}

$indexConfiguratorClass = $this->indexConfigurator;
$indexConfigurator = new $indexConfiguratorClass;
$indexConfigurator = new $indexConfiguratorClass();
}

return $indexConfigurator;
Expand Down Expand Up @@ -92,9 +92,9 @@ public static function search($query, $callback = null)
$softDelete = static::usesSoftDelete() && config('scout.soft_delete', false);

if ($query == '*') {
return new FilterBuilder(new static, $callback, $softDelete);
return new FilterBuilder(new static(), $callback, $softDelete);
} else {
return new SearchBuilder(new static, $query, $callback, $softDelete);
return new SearchBuilder(new static(), $query, $callback, $softDelete);
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Stubs/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@

class Model extends \Illuminate\Database\Eloquent\Model
{
use Searchable, SoftDeletes;
use Searchable;use SoftDeletes;
}

0 comments on commit bc9bb0a

Please sign in to comment.