src/Heterogeny/Seq.php
protected function sanitizeOffset($offset): int
    {
        if (!is_numeric($offset)) {
            throw new \InvalidArgumentException(
                sprintf('`$index` must be an `int`, %s(%s) received', gettype($offset), var_export($offset, true))
            );
        }

        return intval($offset);
    }
protected function sanitizeOffset($offset): int
    {
        if (!is_numeric($offset)) {
            throw new \InvalidArgumentException(
                sprintf('`$index` must be an `int`, %s(%s) received', gettype($offset), var_export($offset, true))
            );
        }

        return intval($offset);
    }
protected function sanitizeOffset ( $ offset ) : int { if ( ! is_numeric ( $ offset ) ) { throw new \ InvalidArgumentException ( sprintf ( '`$index` must be an `int`, %s(%s) received' , gettype ( $ offset ) , var_export ( $ offset , true ) ) ) ; } return intval ( $ offset ) ; }
Validates the offset throw an exception if invalid

@param mixed $offset offset to lookup

@return void

@throws \InvalidArgumentException
Validates the offset throw an exception if invalid