Skip to content

Commit

Permalink
Fixed styleci errors
Browse files Browse the repository at this point in the history
  • Loading branch information
frknakk committed Oct 12, 2023
1 parent add87c0 commit ff66bcb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/QueryDataTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ class QueryDataTable extends DataTableAbstract
protected bool $scoutSearched = false;

/**
* Scout index name
* Scout index name.
*
* @var string
*/
protected string $scoutIndex;

/**
* Scout key name
* Scout key name.
*
* @var string
*/
Expand Down Expand Up @@ -947,10 +947,10 @@ public function ordering(): void
public function enableScoutSearch(string $model, int $max_hits = 1000): static
{
$scout_model = new $model;
if (!class_exists($model) || !($scout_model instanceof Model)) {
if (! class_exists($model) || ! ($scout_model instanceof Model)) {
throw new \Exception("$model must be an Eloquent Model.");
}
if (!method_exists($scout_model, 'searchableAs') || !method_exists($scout_model, 'getScoutKeyName')) {
if (! method_exists($scout_model, 'searchableAs') || ! method_exists($scout_model, 'getScoutKeyName')) {
throw new \Exception("$model must use the Searchable trait.");
}

Expand Down

0 comments on commit ff66bcb

Please sign in to comment.