Page MenuHomePhabricator

MediaWiki.Commenting.FunctionComment.DefaultNullTypeParam wants redundant "mixed|null"
Closed, ResolvedPublic

Description

The code sniffer complains about this:

/**
 * Foo bar.
 *
 * @param mixed $something
 */
function wfFooBar( $something = null ) {
}

with Default of null should be declared in @param tag.

Since the pseudo-type "mixed" already includes null as a possibility, that would be redundant.

Event Timeline

Change 498472 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/tools/codesniffer@master] Treat "mixed" as already including null

https://gerrit.wikimedia.org/r/498472

Change 498472 merged by jenkins-bot:
[mediawiki/tools/codesniffer@master] Treat "mixed" as already including null

https://gerrit.wikimedia.org/r/498472