X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialCachedPage.php;h=14c84e9d97b0a53f43e1cda17f17abebae1a053a;hb=568bd6d1bf0eb65897ca1b21ab3c1d96a96727c7;hp=cb9b07cde4c5dfdd814e5fc16c6d4fc0136cb2d1;hpb=27f8aa732e55f0655255152fa22655fa07424c2d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialCachedPage.php b/includes/specials/SpecialCachedPage.php index cb9b07cde4..14c84e9d97 100644 --- a/includes/specials/SpecialCachedPage.php +++ b/includes/specials/SpecialCachedPage.php @@ -92,7 +92,7 @@ abstract class SpecialCachedPage extends SpecialPage implements ICacheHelper { $this->cacheHelper = new CacheHelper(); $this->cacheHelper->setCacheEnabled( $this->cacheEnabled ); - $this->cacheHelper->setOnInitializedHandler( array( $this, 'onCacheInitialized' ) ); + $this->cacheHelper->setOnInitializedHandler( [ $this, 'onCacheInitialized' ] ); $keyArgs = $this->getCacheKey(); @@ -124,7 +124,7 @@ abstract class SpecialCachedPage extends SpecialPage implements ICacheHelper { * * @return mixed */ - public function getCachedValue( $computeFunction, $args = array(), $key = null ) { + public function getCachedValue( $computeFunction, $args = [], $key = null ) { return $this->cacheHelper->getCachedValue( $computeFunction, $args, $key ); } @@ -140,7 +140,7 @@ abstract class SpecialCachedPage extends SpecialPage implements ICacheHelper { * @param array $args * @param string|null $key */ - public function addCachedHTML( $computeFunction, $args = array(), $key = null ) { + public function addCachedHTML( $computeFunction, $args = [], $key = null ) { $this->getOutput()->addHTML( $this->cacheHelper->getCachedValue( $computeFunction, $args, @@ -180,10 +180,10 @@ abstract class SpecialCachedPage extends SpecialPage implements ICacheHelper { * @return array */ protected function getCacheKey() { - return array( + return [ $this->mName, $this->getLanguage()->getCode() - ); + ]; } /**