diff --git a/CHANGELOG.md b/CHANGELOG.md index 02c7f6f5f0..0494bac144 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed ### Fixed * fixed issue [1789](https://github.com/ruflin/Elastica/issues/1789) +* Fixed type-hint for `Elastica\QueryBuilder\DSL\Aggregation::sampler()` not consistent with the underlying constructor call [#1815](https://github.com/ruflin/Elastica/pull/1815) * Replaced `_routing` and `_retry_on_conflict` by `routing` and `retry_on_conflict` in `AbstractUpdateAction` [#1807](https://github.com/ruflin/Elastica/issues/1807) ### Security diff --git a/src/QueryBuilder/DSL/Aggregation.php b/src/QueryBuilder/DSL/Aggregation.php index 404f144345..fd0a8427c9 100644 --- a/src/QueryBuilder/DSL/Aggregation.php +++ b/src/QueryBuilder/DSL/Aggregation.php @@ -423,13 +423,12 @@ public function adjacency_matrix(string $name): AdjacencyMatrix return new AdjacencyMatrix($name); } - /** sampler aggregation. + /** + * sampler aggregation. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-sampler-aggregation.html - * - * @param string $name */ - public function sampler($name): Sampler + public function sampler(string $name): Sampler { return new Sampler($name); }