Oh, in fact it can be NULL, namely if called from initClassLoader(). The problem there is that we want to do all the magic but we don't have the same data available as in generate(). This is why ClassmapProviderInterface::buildClassMap() also has this argument being optional.

So I am only adding the typehint.