In addition to T217425, currently disabled phan checks 'scalar_implicit_cast' and 'null_casts_as_any_type' should be enabled in Wikibase, too.
A first patch for testing purposes generated 105 phan errors in the jenkins build pipeline. See https://integration.wikimedia.org/ci/job/mwext-php72-phan-docker/32744/console#console-section-0