Skip to content

Commit

Permalink
Fix type-hint for Search::setOptionsAndQuery() (#2009)
Browse files Browse the repository at this point in the history
* Fix type-hint for Search::setOptionsAndQuery()

* Add changelog
  • Loading branch information
deguif authored Oct 29, 2021
1 parent fa230a7 commit f605ac5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Deprecated
### Removed
### Fixed
* Fixed type-hint for `Elastica\Search::setOptionsAndQuery()` [#2009](https://github.com/ruflin/Elastica/pull/2009)
### Security

## [7.1.2](https://github.com/ruflin/Elastica/compare/7.1.1...7.1.2)
Expand Down
13 changes: 6 additions & 7 deletions src/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Elastica;

use Elastica\Exception\InvalidException;
use Elastica\Query\AbstractQuery;
use Elastica\ResultSet\BuilderInterface;
use Elastica\ResultSet\DefaultBuilder;

Expand Down Expand Up @@ -254,8 +253,8 @@ public function getPath(): string
/**
* Search in the set indices.
*
* @param AbstractQuery|array|Query|string $query
* @param array|int $options Limit or associative array of options (option=>value)
* @param array|Query|Query\AbstractQuery|string $query
* @param array|int $options Limit or associative array of options (option=>value)
*
* @throws InvalidException
*/
Expand All @@ -282,8 +281,8 @@ public function search($query = '', $options = null, string $method = Request::P
}

/**
* @param AbstractQuery|array|Query|string $query
* @param bool $fullResult By default only the total hit count is returned. If set to true, the full ResultSet including aggregations is returned
* @param array|Query|Query\AbstractQuery|string $query
* @param bool $fullResult By default only the total hit count is returned. If set to true, the full ResultSet including aggregations is returned
*
* @return int|ResultSet
*/
Expand All @@ -310,8 +309,8 @@ public function count($query = '', bool $fullResult = false, string $method = Re
}

/**
* @param array|int $options
* @param AbstractQuery|array|Query|string $query
* @param array|int $options
* @param array|Query|Query\AbstractQuery|string|Suggest $query
*/
public function setOptionsAndQuery($options = null, $query = ''): self
{
Expand Down

0 comments on commit f605ac5

Please sign in to comment.