Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return static from fluid setters #236

Merged
merged 3 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions util/template/set-bulk-body
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

public function setBody($body): :endpoint
public function setBody($body): static
{
if (isset($body) !== true) {
return $this;
Expand All @@ -17,4 +17,4 @@
throw new InvalidArgumentException("Body must be an array, traversable object or string");
}
return $this;
}
}
2 changes: 1 addition & 1 deletion util/template/set-part
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

public function set:Part($:part): :endpoint
public function set:Part($:part): static
{
if (isset($:part) !== true) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion util/template/set-part-list
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

public function set:Part($:part): :endpoint
public function set:Part($:part): static
{
if (isset($:part) !== true) {
return $this;
Expand Down
Loading