src/Aggregation/Bucketing/RangeAggregation.php
public function removeRangeByKey($key)
    {
        if ($this->keyed) {
            foreach ($this->ranges as $rangeKey => $range) {
                if (array_key_exists('key', $range) && $range['key'] === $key) {
                    unset($this->ranges[$rangeKey]);

                    return true;
                }
            }
        }

        return false;
    }
public function removeRangeByKey($key)
    {
        if ($this->keyed) {
            foreach ($this->ranges as $rangeKey => $range) {
                if (array_key_exists('key', $range) && $range['key'] === $key) {
                    unset($this->ranges[$rangeKey]);

                    return true;
                }
            }
        }

        return false;
    }
public function removeRangeByKey ( $ key ) { if ( $ this -> keyed ) { foreach ( $ this -> ranges as $ rangeKey => $ range ) { if ( array_key_exists ( 'key' , $ range ) && $ range [ 'key' ] === $ key ) { unset ( $ this -> ranges [ $ rangeKey ] ) ; return true ; } } } return false ; }
Removes range by key.

@param string $key Range key.

@return bool
Removes range by key .