src/Aggregation/Bucketing/RangeAggregation.php
public function removeRange($from, $to)
    {
        foreach ($this->ranges as $key => $range) {
            if (array_diff_assoc(array_filter(['from' => $from, 'to' => $to]), $range) === []) {
                unset($this->ranges[$key]);

                return true;
            }
        }

        return false;
    }
public function removeRange($from, $to)
    {
        foreach ($this->ranges as $key => $range) {
            if (array_diff_assoc(array_filter(['from' => $from, 'to' => $to]), $range) === []) {
                unset($this->ranges[$key]);

                return true;
            }
        }

        return false;
    }
public function removeRange ( $ from , $ to ) { foreach ( $ this -> ranges as $ key => $ range ) { if ( array_diff_assoc ( array_filter ( [ 'from' => $ from , 'to' => $ to ] ) , $ range ) === [ ] ) { unset ( $ this -> ranges [ $ key ] ) ; return true ; } } return false ; }
Remove range from aggregation. Returns true on success.

@param int|float|null $from
@param int|float|null $to

@return bool
Remove range from aggregation . Returns true on success .