Although I feel a little sheepish contradicting both a "respected text" as well as another CV user, it seems to me that the Spearman-Brown formula is not affected by having items of differing difficulty. To be sure, the Spearman-Brown formula is usually derived under the assumption that we have parallel items, which implies (among other things) that the items have equal difficulty. But it turns out this assumption isn't necessary; it can be relaxed to allow unequal difficulties, and the Spearman-Brown formula will still hold. I demonstrate this below.
Recall that in classical test theory, a measurement $X$ is assumed to be the sum of a "true score" component $T$ and an error component $E$, that is,
$$
X = T + E,
$$
with $T$ and $E$ uncorrelated. The assumption of parallel items is that all items have the same true scores, differing only in their error components, although these are assumed to have equal variance. In symbols, for any pair of items $X$ and $X'$,
$$
T=T'
\\\textrm{var}(E)=\textrm{var}(E').
$$
Let's see what happens when we relax the first assumption, such that the items might differ in their difficulties, and then derive the reliability of a total test score under these new assumptions. Specifically, assume that the true scores might differ by an additive constant, but the errors still have the same variance. In symbols,
$$
T=T' + c'
\\\textrm{var}(E)=\textrm{var}(E').
$$
Any differences in difficulty are captured by the additive constant. For example, if $c'>0$, then scores on $X$ tend to be higher than scores on $X'$, so that $X$ is "easier" than $X'$. We might call these essentially parallel items, in analogy to the assumption of "essential tau-equivalence" which relaxes the tau-equivalent model in a similar way.
Now to derive the reliability of a test form of such items. Consider a test consisting of $k$ essentially parallel items, the sum of which give the test score. Reliability is, by definition, the ratio of true score variance to observed score variance. For the reliability of the individual items, it follows from the definition of essential parallelism that they have the same reliability, which we denote with $\rho = \sigma^2_T/(\sigma^2_T+\sigma^2_E)$, with $\sigma^2_T$ being the true score variance and $\sigma^2_E$ the error variance. For the reliability of the total test score, we first examine the variance of the total test score, which is
$$
\begin{aligned}
\textrm{var}(\sum_{i=1}^kT_i + E_i) &= \textrm{var}(\sum_{i=1}^kT + c_i + E_i)
\\ &= k^2\sigma^2_T + k\sigma^2_E,
\end{aligned}
$$
where $T$ (no subscript) is any arbitrary true score that all the items' true scores can be shifted to via their constant terms, $\sigma^2_T$ is the true score variance, and $\sigma^2_E$ is the error variance. Notice that the constant terms drop out! This is key. So then the reliability of the total test score is
$$
\begin{aligned}
\frac{k^2\sigma^2_T}{k^2\sigma^2_T + k\sigma^2_E} &= \frac{k\sigma^2_T}{k\sigma^2_T + \sigma^2_X - \sigma^2_T}
\\&= \frac{k\rho}{1+(k-1)\rho},
\end{aligned}
$$
which is just the classical Spearman-Brown formula, unaltered. What this shows is that even when varying the "difficulty" of the items, defined as their mean scores, the Spearman-Brown formula still holds.
@JeremyMiles raises some interesting and important points about what can happen when we increase test length "in the real world," but at least according to the idealized assumptions of classical test theory, variations in item difficulty don't matter for the reliability of a test form (in stark contrast to the assumptions of modern Item Response Theory!). This same basic line of reasoning is also why we usually speak of essential tau-equivalence rather than tau-equivalence, because most all of the important results hold for the more lenient case where item difficulties (i.e., means) can differ.