From: Ricordisamoa Date: Wed, 10 Feb 2016 17:13:38 +0000 (+0100) Subject: resourceloader: Remove obsolete '$that = $this' closure pattern X-Git-Tag: 1.31.0-rc.0~8012^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_supprimer.php?a=commitdiff_plain;h=f9b4a217e9b652ef12ce5e826d594d207d1af8d8;p=lhc%2Fweb%2Fwiklou.git resourceloader: Remove obsolete '$that = $this' closure pattern Closures support $this as of PHP 5.4. Change-Id: Ib00be459490569036604afff53bd99fe247737df --- diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index d7b51b864d..51a6225edf 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -618,11 +618,8 @@ class ResourceLoader implements LoggerAwareInterface { if ( !$modules ) { return ''; } - // Support: PHP 5.3 ("$this" for anonymous functions was added in PHP 5.4.0) - // http://php.net/functions.anonymous - $rl = $this; - $hashes = array_map( function ( $module ) use ( $rl, $context ) { - return $rl->getModule( $module )->getVersionHash( $context ); + $hashes = array_map( function ( $module ) use ( $context ) { + return $this->getModule( $module )->getVersionHash( $context ); }, $modules ); return self::makeHash( implode( $hashes ) ); }