From f605ac5b29796071861267e93819f9f04b5f5c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-Xavier=20de=20Guillebon?= Date: Fri, 29 Oct 2021 15:44:09 +0200 Subject: [PATCH] Fix type-hint for Search::setOptionsAndQuery() (#2009) * Fix type-hint for Search::setOptionsAndQuery() * Add changelog --- CHANGELOG.md | 1 + src/Search.php | 13 ++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7a7c4aded..28af191cc7 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/src/Search.php b/src/Search.php index 9004a9c14b..082b16c363 100644 --- a/src/Search.php +++ b/src/Search.php @@ -3,7 +3,6 @@ namespace Elastica; use Elastica\Exception\InvalidException; -use Elastica\Query\AbstractQuery; use Elastica\ResultSet\BuilderInterface; use Elastica\ResultSet\DefaultBuilder; @@ -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 */ @@ -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 */ @@ -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 {