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

Ipv4RangeAggregation::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
rs 9.4285
cc 1
eloc 6
nc 1
nop 3
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\Ipv4RangeAggregation as Base;
15
16
/**
17
 * Class representing ip range 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
class Ipv4RangeAggregation extends Base
23
{
24
    public function __construct($name, $field, array $ranges)
25
    {
26
        parent::__construct($name, $field, $ranges);
27
28
        trigger_error(
29
            'This aggregation is moved to `Bucketing` namespace. Use the new namespace instead.' .
30
            ' It will be removed in 3.0',
31
            E_USER_DEPRECATED
32
        );
33
    }
34
}
35