Merge "Ignore some ScopedCallback IDE warnings"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 16 Jul 2015 23:32:22 +0000 (23:32 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 16 Jul 2015 23:32:22 +0000 (23:32 +0000)
1  2 
includes/db/LoadMonitorMySQL.php

@@@ -79,12 -79,13 +79,13 @@@ class LoadMonitorMySQL implements LoadM
                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 );
                        } );
                } elseif ( $staleValue ) {
                        # Could not acquire lock but an old cache exists, so use it
 -                      return $value['lagTimes'];
 +                      return $staleValue['lagTimes'];
                }
  
                $lagTimes = array();