public function remove(int $offset): Period
    {
        $interval = $this->get($offset);
        unset($this->intervals[$offset]);

        $this->intervals = array_values($this->intervals);

        return $interval;
    }
public function remove(int $offset): Period
    {
        $interval = $this->get($offset);
        unset($this->intervals[$offset]);

        $this->intervals = array_values($this->intervals);

        return $interval;
    }
public function remove ( int $ offset ) : Period { $ interval = $ this -> get ( $ offset ) ; unset ( $ this -> intervals [ $ offset ] ) ; $ this -> intervals = array_values ( $ this -> intervals ) ; return $ interval ; }
Removes an interval from the sequence at the given offset and returns it.

The sequence is re-indexed after removal

@throws InvalidIndex If the offset is illegal for the current sequence.
Removes an interval from the sequence at the given offset and returns it .