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

GeoHashGridAggregation::getArray()   B

Complexity

Conditions 5
Paths 9

Size

Total Lines 24
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 24
rs 8.5125
c 0
b 0
f 0
nc 9
cc 5
eloc 13
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\Type\BucketingTrait;
15
use ONGR\ElasticsearchDSL\Aggregation\Bucketing\GeoHashGridAggregation as Base;
16
17
/**
18
 * Class representing geohash grid aggregation.
19
 *
20
 * @deprecated Aggregations was moved to it's type namespace. Add `Metric` or `Bucketing` after `Aggregation`.
21
 *     This class will be removed in 3.0.
22
 */
23
class GeoHashGridAggregation extends Base
24
{
25
    public function __construct($name, $field, $precision, $size, $shardSize)
26
    {
27
        parent::__construct($name, $field, $precision, $size, $shardSize);
28
29
        trigger_error(
30
            'This aggregation is moved to `Bucketing` namespace. Use the new namespace instead.' .
31
            ' It will be removed in 3.0',
32
            E_USER_DEPRECATED
33
        );
34
    }
35
}
36