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

Elastica\Aggregation\DateHistogram expects int as interval #1504

Closed
Vorta opened this issue Jun 5, 2018 · 2 comments
Closed

Elastica\Aggregation\DateHistogram expects int as interval #1504

Vorta opened this issue Jun 5, 2018 · 2 comments

Comments

@Vorta
Copy link

Vorta commented Jun 5, 2018

From Elastica\Aggregation\Histogram which DateHistogram extends

    /**
     * @param string $name     the name of this aggregation
     * @param string $field    the name of the field on which to perform the aggregation
     * @param int    $interval the interval by which documents will be bucketed
     */
    public function __construct($name, $field, $interval)
    {
        parent::__construct($name);
        $this->setField($field);
        $this->setInterval($interval);
    }

@param for $interval should be string for DateHistogram, not int.

Suggestion:
Change to @param int|string $interval

@ruflin
Copy link
Owner

ruflin commented Jun 6, 2018

If I understand this correctly, it's mainly a documentation issue? Do you want to open a PR with the change?

@ruflin
Copy link
Owner

ruflin commented Nov 19, 2018

Resolved in #1534

@ruflin ruflin closed this as completed Nov 19, 2018
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

No branches or pull requests

2 participants