private function guardedSeek($index, $method) { $index = intGuard($index); $this->indexGuard($index, $method); return $this->seekTo($index); }
/** * @param int $index * * @throws TypeException when $index is not an integer. * @return void */ function remove($index) { $ndx = intGuard($index); if ($this->offsetExists($ndx)) { array_splice($this->array, $ndx, 1); } }