public function shiftUp(int $index) : void
    {
        if ($index + 1 === $this->count()) {
            return;
        }

        $this->swap($index, $index + 1);
    }
public function shiftUp(int $index) : void
    {
        if ($index + 1 === $this->count()) {
            return;
        }

        $this->swap($index, $index + 1);
    }
public function shiftUp ( int $ index ) : void { if ( $ index + 1 === $ this -> count ( ) ) { return ; } $ this -> swap ( $ index , $ index + 1 ) ; }
Shifts an entry to the next index.

This will effectively swap this entry with the next entry.
If this entry is the last one in the array, this method will do nothing.

@param int $index

@return void
Shifts an entry to the next index .