From fb9ad4c13045a3b5ec01540df39acba93df78d85 Mon Sep 17 00:00:00 2001 From: Sergey Avseyev Date: Thu, 25 Apr 2024 08:54:43 -0700 Subject: [PATCH] PCBC-988: fix type annotation for JsonSerializable implementations (#166) --- Couchbase/BooleanFieldSearchQuery.php | 2 +- Couchbase/BooleanSearchQuery.php | 2 +- Couchbase/ConjunctionSearchQuery.php | 2 +- Couchbase/Coordinate.php | 2 +- Couchbase/DateRangeSearchFacet.php | 2 +- Couchbase/DateRangeSearchQuery.php | 2 +- Couchbase/DisjunctionSearchQuery.php | 2 +- Couchbase/GeoBoundingBoxSearchQuery.php | 2 +- Couchbase/GeoDistanceSearchQuery.php | 2 +- Couchbase/GeoPolygonQuery.php | 2 +- Couchbase/MatchAllSearchQuery.php | 2 +- Couchbase/MatchNoneSearchQuery.php | 2 +- Couchbase/MatchPhraseSearchQuery.php | 2 +- Couchbase/MatchSearchQuery.php | 2 +- Couchbase/NumericRangeSearchFacet.php | 2 +- Couchbase/NumericRangeSearchQuery.php | 2 +- Couchbase/PhraseSearchQuery.php | 2 +- Couchbase/PrefixSearchQuery.php | 2 +- Couchbase/QueryStringSearchQuery.php | 2 +- Couchbase/SearchOptions.php | 2 +- Couchbase/SearchSortField.php | 2 +- Couchbase/SearchSortGeoDistance.php | 2 +- Couchbase/SearchSortId.php | 2 +- Couchbase/SearchSortScore.php | 2 +- Couchbase/TermRangeSearchQuery.php | 2 +- Couchbase/TermSearchFacet.php | 2 +- Couchbase/TermSearchQuery.php | 2 +- Couchbase/WildcardSearchQuery.php | 2 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Couchbase/BooleanFieldSearchQuery.php b/Couchbase/BooleanFieldSearchQuery.php index 86f5182a..747c348e 100644 --- a/Couchbase/BooleanFieldSearchQuery.php +++ b/Couchbase/BooleanFieldSearchQuery.php @@ -81,7 +81,7 @@ public function field(string $field): BooleanFieldSearchQuery * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return BooleanFieldSearchQuery::export($this); } diff --git a/Couchbase/BooleanSearchQuery.php b/Couchbase/BooleanSearchQuery.php index e5fdbcce..4a179563 100644 --- a/Couchbase/BooleanSearchQuery.php +++ b/Couchbase/BooleanSearchQuery.php @@ -124,7 +124,7 @@ public function min(int $minForShould): BooleanSearchQuery * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return BooleanSearchQuery::export($this); } diff --git a/Couchbase/ConjunctionSearchQuery.php b/Couchbase/ConjunctionSearchQuery.php index 9dfeb9ad..af797b8c 100644 --- a/Couchbase/ConjunctionSearchQuery.php +++ b/Couchbase/ConjunctionSearchQuery.php @@ -105,7 +105,7 @@ public function childQueries(): array * @return mixed * @throws InvalidArgumentException */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return ConjunctionSearchQuery::export($this); } diff --git a/Couchbase/Coordinate.php b/Couchbase/Coordinate.php index 55747ff9..d29734d5 100644 --- a/Couchbase/Coordinate.php +++ b/Couchbase/Coordinate.php @@ -44,7 +44,7 @@ public function __construct(float $longitude, float $latitude) * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return Coordinate::export($this); } diff --git a/Couchbase/DateRangeSearchFacet.php b/Couchbase/DateRangeSearchFacet.php index 8473aee6..40560ae6 100644 --- a/Couchbase/DateRangeSearchFacet.php +++ b/Couchbase/DateRangeSearchFacet.php @@ -88,7 +88,7 @@ public function addRange(string $name, $start = null, $end = null): DateRangeSea * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return DateRangeSearchFacet::export($this); } diff --git a/Couchbase/DateRangeSearchQuery.php b/Couchbase/DateRangeSearchQuery.php index fc772af3..b1354a7e 100644 --- a/Couchbase/DateRangeSearchQuery.php +++ b/Couchbase/DateRangeSearchQuery.php @@ -153,7 +153,7 @@ public function datetimeParser(string $parser): DateRangeSearchQuery * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return DateRangeSearchQuery::export($this); } diff --git a/Couchbase/DisjunctionSearchQuery.php b/Couchbase/DisjunctionSearchQuery.php index 8487f459..9078378b 100644 --- a/Couchbase/DisjunctionSearchQuery.php +++ b/Couchbase/DisjunctionSearchQuery.php @@ -121,7 +121,7 @@ public function childQueries(): array * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return DisjunctionSearchQuery::export($this); } diff --git a/Couchbase/GeoBoundingBoxSearchQuery.php b/Couchbase/GeoBoundingBoxSearchQuery.php index dc9b5026..5bdd3386 100644 --- a/Couchbase/GeoBoundingBoxSearchQuery.php +++ b/Couchbase/GeoBoundingBoxSearchQuery.php @@ -98,7 +98,7 @@ public function field(string $field): GeoBoundingBoxSearchQuery * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return GeoBoundingBoxSearchQuery::export($this); } diff --git a/Couchbase/GeoDistanceSearchQuery.php b/Couchbase/GeoDistanceSearchQuery.php index a46ec03b..45ac8776 100644 --- a/Couchbase/GeoDistanceSearchQuery.php +++ b/Couchbase/GeoDistanceSearchQuery.php @@ -96,7 +96,7 @@ public function field(string $field): GeoDistanceSearchQuery * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return GeoDistanceSearchQuery::export($this); } diff --git a/Couchbase/GeoPolygonQuery.php b/Couchbase/GeoPolygonQuery.php index 93e261f1..1ddf47d8 100644 --- a/Couchbase/GeoPolygonQuery.php +++ b/Couchbase/GeoPolygonQuery.php @@ -74,7 +74,7 @@ public function field(string $field): GeoPolygonQuery * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return GeoPolygonQuery::export($this); } diff --git a/Couchbase/MatchAllSearchQuery.php b/Couchbase/MatchAllSearchQuery.php index 4830b7f4..5c6b73dd 100644 --- a/Couchbase/MatchAllSearchQuery.php +++ b/Couchbase/MatchAllSearchQuery.php @@ -58,7 +58,7 @@ public function boost(float $boost): MatchAllSearchQuery * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return MatchAllSearchQuery::export($this); } diff --git a/Couchbase/MatchNoneSearchQuery.php b/Couchbase/MatchNoneSearchQuery.php index e0f4bf4e..cb4eddda 100644 --- a/Couchbase/MatchNoneSearchQuery.php +++ b/Couchbase/MatchNoneSearchQuery.php @@ -58,7 +58,7 @@ public function boost(float $boost): MatchNoneSearchQuery * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return MatchNoneSearchQuery::export($this); } diff --git a/Couchbase/MatchPhraseSearchQuery.php b/Couchbase/MatchPhraseSearchQuery.php index 680ac980..4fa434c1 100644 --- a/Couchbase/MatchPhraseSearchQuery.php +++ b/Couchbase/MatchPhraseSearchQuery.php @@ -97,7 +97,7 @@ public function analyzer(string $analyzer): MatchPhraseSearchQuery * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return MatchPhraseSearchQuery::export($this); } diff --git a/Couchbase/MatchSearchQuery.php b/Couchbase/MatchSearchQuery.php index 2397ed07..3091ee9d 100644 --- a/Couchbase/MatchSearchQuery.php +++ b/Couchbase/MatchSearchQuery.php @@ -149,7 +149,7 @@ public function operator(string $operator): MatchSearchQuery * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return MatchSearchQuery::export($this); } diff --git a/Couchbase/NumericRangeSearchFacet.php b/Couchbase/NumericRangeSearchFacet.php index 08df7ba0..4096d00a 100644 --- a/Couchbase/NumericRangeSearchFacet.php +++ b/Couchbase/NumericRangeSearchFacet.php @@ -68,7 +68,7 @@ public function addRange(string $name, float $min = null, float $max = null): Nu /** * @throws InvalidArgumentException */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return NumericRangeSearchFacet::export($this); } diff --git a/Couchbase/NumericRangeSearchQuery.php b/Couchbase/NumericRangeSearchQuery.php index 87f2743a..5cbac5df 100644 --- a/Couchbase/NumericRangeSearchQuery.php +++ b/Couchbase/NumericRangeSearchQuery.php @@ -111,7 +111,7 @@ public function max(float $max, bool $inclusive = false): NumericRangeSearchQuer * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return NumericRangeSearchQuery::export($this); } diff --git a/Couchbase/PhraseSearchQuery.php b/Couchbase/PhraseSearchQuery.php index c2836c45..d2b6490d 100644 --- a/Couchbase/PhraseSearchQuery.php +++ b/Couchbase/PhraseSearchQuery.php @@ -87,7 +87,7 @@ public function field(string $field): PhraseSearchQuery * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return PhraseSearchQuery::export($this); } diff --git a/Couchbase/PrefixSearchQuery.php b/Couchbase/PrefixSearchQuery.php index 60dfcd5c..bd9603b6 100644 --- a/Couchbase/PrefixSearchQuery.php +++ b/Couchbase/PrefixSearchQuery.php @@ -84,7 +84,7 @@ public function field(string $field): PrefixSearchQuery * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return PrefixSearchQuery::export($this); } diff --git a/Couchbase/QueryStringSearchQuery.php b/Couchbase/QueryStringSearchQuery.php index 6b780502..e8ca3e2c 100644 --- a/Couchbase/QueryStringSearchQuery.php +++ b/Couchbase/QueryStringSearchQuery.php @@ -69,7 +69,7 @@ public function boost(float $boost): QueryStringSearchQuery * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return QueryStringSearchQuery::export($this); } diff --git a/Couchbase/SearchOptions.php b/Couchbase/SearchOptions.php index dbaebc4a..80e09812 100644 --- a/Couchbase/SearchOptions.php +++ b/Couchbase/SearchOptions.php @@ -278,7 +278,7 @@ public function includeLocations(bool $enabled): SearchOptions * @return mixed * @internal */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return SearchOptions::export($this); } diff --git a/Couchbase/SearchSortField.php b/Couchbase/SearchSortField.php index 80cb4eca..865aef1c 100644 --- a/Couchbase/SearchSortField.php +++ b/Couchbase/SearchSortField.php @@ -106,7 +106,7 @@ public function missing(string $missing): SearchSortField * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return SearchSortField::export($this); } diff --git a/Couchbase/SearchSortGeoDistance.php b/Couchbase/SearchSortGeoDistance.php index 82407d27..2f4be6df 100644 --- a/Couchbase/SearchSortGeoDistance.php +++ b/Couchbase/SearchSortGeoDistance.php @@ -77,7 +77,7 @@ public function unit(string $unit): SearchSortGeoDistance * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return SearchSortGeoDistance::export($this); } diff --git a/Couchbase/SearchSortId.php b/Couchbase/SearchSortId.php index 4e9a8e23..92b2b22c 100644 --- a/Couchbase/SearchSortId.php +++ b/Couchbase/SearchSortId.php @@ -47,7 +47,7 @@ public function descending(bool $descending): SearchSortId * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return SearchSortId::export($this); } diff --git a/Couchbase/SearchSortScore.php b/Couchbase/SearchSortScore.php index cf8675d1..e35fe379 100644 --- a/Couchbase/SearchSortScore.php +++ b/Couchbase/SearchSortScore.php @@ -47,7 +47,7 @@ public function descending(bool $descending): SearchSortScore * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return SearchSortScore::export($this); } diff --git a/Couchbase/TermRangeSearchQuery.php b/Couchbase/TermRangeSearchQuery.php index 10a1d105..e6fa5522 100644 --- a/Couchbase/TermRangeSearchQuery.php +++ b/Couchbase/TermRangeSearchQuery.php @@ -111,7 +111,7 @@ public function max(string $max, bool $inclusive = false): TermRangeSearchQuery * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return TermRangeSearchQuery::export($this); } diff --git a/Couchbase/TermSearchFacet.php b/Couchbase/TermSearchFacet.php index e70716c8..ef591d9b 100644 --- a/Couchbase/TermSearchFacet.php +++ b/Couchbase/TermSearchFacet.php @@ -44,7 +44,7 @@ public function __construct(string $field, int $limit) * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return TermSearchFacet::export($this); } diff --git a/Couchbase/TermSearchQuery.php b/Couchbase/TermSearchQuery.php index aa84525c..d64bc979 100644 --- a/Couchbase/TermSearchQuery.php +++ b/Couchbase/TermSearchQuery.php @@ -115,7 +115,7 @@ public function fuzziness(int $fuzziness): TermSearchQuery * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return TermSearchQuery::export($this); } diff --git a/Couchbase/WildcardSearchQuery.php b/Couchbase/WildcardSearchQuery.php index 20d0424c..f8103801 100644 --- a/Couchbase/WildcardSearchQuery.php +++ b/Couchbase/WildcardSearchQuery.php @@ -84,7 +84,7 @@ public function field(string $field): WildcardSearchQuery * @internal * @return mixed */ - public function jsonSerialize() + public function jsonSerialize(): mixed { return WildcardSearchQuery::export($this); }