Aaron Schulz has uploaded a new change for review.

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

Change subject: Ignore some ScopedCallback IDE warnings
......................................................................

Ignore some ScopedCallback IDE warnings

Change-Id: Iefe24ee5dae90d70c2acaaae9dc5d44c1758d53a
---
M includes/api/ApiStashEdit.php
M includes/db/LoadMonitor.php
M includes/media/SVG.php
M includes/media/XMP.php
4 files changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/35/224735/1

diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php
index 177b546..a66b356 100644
--- a/includes/api/ApiStashEdit.php
+++ b/includes/api/ApiStashEdit.php
@@ -112,6 +112,7 @@
                if ( $user->pingLimiter( 'stashedit' ) ) {
                        $status = 'ratelimited';
                } elseif ( $wgMemc->lock( $key, 0, 30 ) ) {
+                       /** @noinspection PhpUnusedLocalVariableInspection */
                        $unlocker = new ScopedCallback( function() use ( $key ) 
{
                                global $wgMemc;
                                $wgMemc->unlock( $key );
diff --git a/includes/db/LoadMonitor.php b/includes/db/LoadMonitor.php
index 01d2f95..f9a5695 100644
--- a/includes/db/LoadMonitor.php
+++ b/includes/db/LoadMonitor.php
@@ -125,6 +125,7 @@
                if ( $this->mainCache->lock( $key, 0, 10 ) ) {
                        # Let this process alone update the cache value
                        $cache = $this->mainCache;
+                       /** @noinspection PhpUnusedLocalVariableInspection */
                        $unlocker = new ScopedCallback( function () use ( 
$cache, $key ) {
                                $cache->unlock( $key );
                        } );
diff --git a/includes/media/SVG.php b/includes/media/SVG.php
index 4377f75..1118598 100644
--- a/includes/media/SVG.php
+++ b/includes/media/SVG.php
@@ -205,6 +205,7 @@
                $tmpDir = wfTempDir() . '/svg_' . wfRandomString( 24 );
                $lnPath = "$tmpDir/" . basename( $srcPath );
                $ok = mkdir( $tmpDir, 0771 ) && symlink( $srcPath, $lnPath );
+               /** @noinspection PhpUnusedLocalVariableInspection */
                $cleaner = new ScopedCallback( function () use ( $tmpDir, 
$lnPath ) {
                        MediaWiki\suppressWarnings();
                        unlink( $lnPath );
diff --git a/includes/media/XMP.php b/includes/media/XMP.php
index a838355..12550a5 100644
--- a/includes/media/XMP.php
+++ b/includes/media/XMP.php
@@ -525,6 +525,7 @@
                );
 
                $oldDisable = libxml_disable_entity_loader( true );
+               /** @noinspection PhpUnusedLocalVariableInspection */
                $reset = new ScopedCallback(
                        'libxml_disable_entity_loader',
                        array( $oldDisable )

-- 
To view, visit https://gerrit.wikimedia.org/r/224735
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iefe24ee5dae90d70c2acaaae9dc5d44c1758d53a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to