From 431dd729ce1240a52887c53362d9547498d48668 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 22 Apr 2016 14:17:26 -0700 Subject: [PATCH] Convert array() => [] in some comments Change-Id: Ibdaf92617f2971aaf977d99c8674b4236ffa5a1f --- includes/libs/objectcache/WANObjectCache.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/includes/libs/objectcache/WANObjectCache.php b/includes/libs/objectcache/WANObjectCache.php index 57cecd0e78..18cc10e43c 100644 --- a/includes/libs/objectcache/WANObjectCache.php +++ b/includes/libs/objectcache/WANObjectCache.php @@ -675,12 +675,12 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { * * return CatConfig::newFromRow( $dbr->selectRow( ... ) ); * }, - * array( + * [ * // Calling touchCheckKey() on this key invalidates the cache - * 'checkKeys' => array( $cache->makeKey( 'site-cat-config' ) ), + * 'checkKeys' => [ $cache->makeKey( 'site-cat-config' ) ], * // Try to only let one datacenter thread manage cache updates at a time * 'lockTSE' => 30 - * ) + * ] * ); * @endcode * @@ -700,15 +700,15 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { * * return CatState::newFromResults( $dbr->select( ... ) ); * }, - * array( + * [ * // The "check" keys that represent things the value depends on; * // Calling touchCheckKey() on any of them invalidates the cache - * 'checkKeys' => array( + * 'checkKeys' => [ * $cache->makeKey( 'sustenance-bowls', $cat->getRoomId() ), * $cache->makeKey( 'people-present', $cat->getHouseId() ), * $cache->makeKey( 'cat-laws', $cat->getCityId() ), - * ) - * ) + * ] + * ] * ); * @endcode * @@ -726,7 +726,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { * $setOpts += Database::getCacheSetOptions( $dbr ); * * // Start off with the last cached list - * $list = $oldValue ?: array(); + * $list = $oldValue ?: []; * // Fetch the last 100 relevant rows in descending order; * // only fetch rows newer than $list[0] to reduce scanning * $rows = iterator_to_array( $dbr->select( ... ) ); @@ -734,7 +734,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { * return array_slice( array_merge( $new, $list ), 0, 100 ); * }, * // Try to only let one datacenter thread manage cache updates at a time - * array( 'lockTSE' => 30 ) + * [ 'lockTSE' => 30 ] * ); * @endcode * -- 2.20.1