Page MenuHomePhabricator

Assignment to a class variable in an anonymous class incorrectly triggers MediaWiki.Usage.AssignmentInReturn.AssignmentInReturn
Closed, ResolvedPublic

Description

Reproducible test case:

function test() {
	return new class() extends SkinTemplate {
		public $skinname = 'vector';
	};
}

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 3 2019, 7:43 PM
Mainframe98 triaged this task as Normal priority.Feb 3 2019, 7:43 PM

Change 487662 had a related patch set uploaded (by Mainframe98; owner: Mainframe98):
[mediawiki/tools/codesniffer@master] Also exclude anonymous classes in AssignmentInReturnSniff

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

Change 487662 merged by jenkins-bot:
[mediawiki/tools/codesniffer@master] Also exclude anonymous classes in AssignmentInReturnSniff

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

Mainframe98 closed this task as Resolved.Feb 6 2019, 6:43 AM