Completed
Pull Request — master (#148)
by Simonas
02:51
created

DateHistogramAggregation::getArray()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 14
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 14
rs 9.4285
cc 3
eloc 8
nc 2
nop 0
1
<?php
2
3
/*
4
 * This file is part of the ONGR package.
5
 *
6
 * (c) NFQ Technologies UAB <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace ONGR\ElasticsearchDSL\Aggregation;
13
14
use ONGR\ElasticsearchDSL\Aggregation\Bucketing\DateHistogramAggregation as Base;
15
16
/**
17
 * Class representing Histogram aggregation.
18
 *
19
 * @deprecated Aggregations was moved to it's type namespace. Add `Metric` or `Bucketing` after `Aggregation`.
20
 *     This class will be removed in 3.0.
21
 *
22
 * @link https://goo.gl/hGCdDd
23
 */
24
class DateHistogramAggregation extends Base
25
{
26
    public function __construct($name, $field, $interval)
27
    {
28
        parent::__construct($name, $field, $interval);
29
30
        trigger_error(
31
            'This aggregation is moved to `Bucketing` namespace. Use the new namespace instead.' .
32
            ' It will be removed in 3.0',
33
            E_USER_DEPRECATED
34
        );
35
    }
36
}
37