Steps to replicate the issue (include links if applicable):
Write a function like the one below. And run a PHPCS check on it.
function foo( Foo|Bar|null $baz = null ) { /* ... */ }
What happens?:
The rule MediaWiki.Usage.NullableType.ExplicitNullableTypes expects the type hint to be changed to ?Foo|Bar|null, which is (1) redundant – there's null already and (2) invalid in PHP – question mark can be used only on a single type.
What should have happened instead?:
PHPCS should have accepted this code.
Other information (browser name/version, screenshots, etc.): Noticed it here: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1207792/comment/8de0a98c_8a7ee431/