Don't use `phpcs:ignoreFile` to selectively ignore sniffs
authorKunal Mehta <legoktm@member.fsf.org>
Sun, 8 Apr 2018 19:39:46 +0000 (12:39 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Mon, 9 Apr 2018 00:08:53 +0000 (17:08 -0700)
commit24ae4318b36f88f2dd43db5989074b65776e2cf8
tree1344c037b2a118415cb957109cbe4db9db540850
parent0df357b9137ac96ebb6d59bccb99ba9c4680bf46
Don't use `phpcs:ignoreFile` to selectively ignore sniffs

Because it doesn't work. `phpcs:ignoreFile` is intended as a performance
shortcut, and gives up on the file as soon as that token is found.
Instead, use `phpcs:disable` which does support selectively disabling
some sniffs. And since disabling is local to the file, there's no need
to re-enable it at the bottom of the file.

<https://github.com/squizlabs/PHP_CodeSniffer/issues/1903> has some
relevant discussion and clarification from upstream on this.

And make the files that are now being re-enabled pass PHPCS.

Change-Id: Ia4d8c45045f61cf9f24eb1d8631ff98d99c82d69
autoload.php
includes/PHPVersionCheck.php
includes/utils/AutoloadGenerator.php
mw-config/index.php