diff --git a/CHANGELOG.md b/CHANGELOG.md index d0990725..5f5e6a8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Added support for PHP 8.3 and 8.4 ([#229](https://github.com/opensearch-project/opensearch-php/pull/229)) ### Changed - Increased min version of `ezimuel/ringphp` to `^1.2.2` +- Changed fluent setters to return static ### Deprecated ### Removed ### Fixed diff --git a/util/template/set-bulk-body b/util/template/set-bulk-body index bebb6700..ece8963f 100644 --- a/util/template/set-bulk-body +++ b/util/template/set-bulk-body @@ -1,5 +1,5 @@ - public function setBody($body): :endpoint + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -17,4 +17,4 @@ throw new InvalidArgumentException("Body must be an array, traversable object or string"); } return $this; - } \ No newline at end of file + } diff --git a/util/template/set-part b/util/template/set-part index 5397fed5..e84cc82e 100644 --- a/util/template/set-part +++ b/util/template/set-part @@ -1,5 +1,5 @@ - public function set:Part($:part): :endpoint + public function set:Part($:part): static { if (isset($:part) !== true) { return $this; diff --git a/util/template/set-part-list b/util/template/set-part-list index 21fa1361..6f786de9 100644 --- a/util/template/set-part-list +++ b/util/template/set-part-list @@ -1,5 +1,5 @@ - public function set:Part($:part): :endpoint + public function set:Part($:part): static { if (isset($:part) !== true) { return $this;