diff --git a/src/Search.php b/src/Search.php index acef75e..1888def 100644 --- a/src/Search.php +++ b/src/Search.php @@ -9,8 +9,12 @@ * @method static \ProtoneMedia\LaravelCrossEloquentSearch\Searcher orderByAsc() * @method static \ProtoneMedia\LaravelCrossEloquentSearch\Searcher orderByDesc() * @method static \ProtoneMedia\LaravelCrossEloquentSearch\Searcher dontParseTerm() - * @method static \ProtoneMedia\LaravelCrossEloquentSearch\Searcher startWithWildcard() - * @method static \ProtoneMedia\LaravelCrossEloquentSearch\Searcher add($query, $columns, string $orderByColumn = 'updated_at') + * @method static \ProtoneMedia\LaravelCrossEloquentSearch\Searcher beginWithWildcard(bool $state) + * @method static \ProtoneMedia\LaravelCrossEloquentSearch\Searcher endWithWildcard(bool $state) + * @method static \ProtoneMedia\LaravelCrossEloquentSearch\Searcher soundsLike(bool $state) + * @method static \ProtoneMedia\LaravelCrossEloquentSearch\Searcher add($query, $columns, string $orderByColumn = null) + * @method static \ProtoneMedia\LaravelCrossEloquentSearch\Searcher addWhen($value, $query, $columns, string $orderByColumn = null) + * @method static \ProtoneMedia\LaravelCrossEloquentSearch\Searcher addMany($queries) * @method static \ProtoneMedia\LaravelCrossEloquentSearch\Searcher paginate($perPage = 15, $pageName = 'page', $page = null) * @method static \ProtoneMedia\LaravelCrossEloquentSearch\Searcher simplePaginate($perPage = 15, $pageName = 'page', $page = null) * @method static \Illuminate\Support\Collection parseTerms(string $terms, callable $callback = null) diff --git a/src/Searcher.php b/src/Searcher.php index 9bb034d..1052512 100644 --- a/src/Searcher.php +++ b/src/Searcher.php @@ -151,7 +151,7 @@ public function add($query, $columns = null, string $orderByColumn = null): self * @param string $orderByColumn * @return self */ - public function addWhen($value, $query, $columns = null, string $orderByColumn = 'updated_at'): self + public function addWhen($value, $query, $columns = null, string $orderByColumn = null): self { if (!$value) { return $this; @@ -194,7 +194,7 @@ public function orderBy(string $orderByColumn): self * @param boolean $state * @return self */ - public function beginWithWildcard($state = true): self + public function beginWithWildcard(bool $state = true): self { $this->beginWithWildcard = $state; @@ -207,7 +207,7 @@ public function beginWithWildcard($state = true): self * @param boolean $state * @return self */ - public function endWithWildcard($state = true): self + public function endWithWildcard(bool $state = true): self { $this->endWithWildcard = $state; @@ -219,7 +219,7 @@ public function endWithWildcard($state = true): self * * @return self */ - public function soundsLike($state = true): self + public function soundsLike(bool $state = true): self { $this->soundsLike = $state;