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

Extract setting gap policy to trait #2023

Merged
merged 2 commits into from
Nov 23, 2021
Merged

Extract setting gap policy to trait #2023

merged 2 commits into from
Nov 23, 2021

Conversation

stchr
Copy link
Contributor

@stchr stchr commented Nov 22, 2021

The purpose of the introduced interface is to avoid typos by using constants for options.

That said, it also fixed the typo on Serial differencing aggregation, which is/was also a typo in the official docs. See elastic/elasticsearch#80893

Copy link
Owner

@ruflin ruflin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks a lot for the contribution.

Just triggered CI and hopefully goes green soonish.

*/
trait GapPolicyTrait
{
public function setGapPolicy(string $gapPolicy = GapPolicyInterface::SKIP): self
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means we now have skip as the default for all gapPolicy functions which I like.

@ruflin ruflin merged commit 6b92d87 into ruflin:master Nov 23, 2021
@ruflin
Copy link
Owner

ruflin commented Nov 23, 2021

Merged 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants