Remove phpcs exclude rules and update PHP code

Change-Id: Ifecf2f8a053b9304a8e9e6558cd7c1f570f15084
This commit is contained in:
Fomafix 2022-11-04 13:09:25 +00:00
parent c9c8af5690
commit 42ef4ee402
2 changed files with 3 additions and 4 deletions

View file

@ -1,8 +1,6 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
</rule>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki" />
<rule ref="Generic.Files.LineLength">
<exclude-pattern>Nuke\.alias\.php</exclude-pattern>
</rule>

View file

@ -405,7 +405,8 @@ class SpecialNuke extends SpecialPage {
$file = $title->getNamespace() === NS_FILE ? $localRepo->newFile( $title ) : false;
if ( $file ) {
$oldimage = null; // Must be passed by reference
// Must be passed by reference
$oldimage = null;
$status = FileDeleteForm::doDelete(
$title,
$file,