dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "RCFilters: Make 'related links' collapsible"
[lhc/web/wiklou.git]
/
includes
/
libs
/
ArrayUtils.php
diff --git
a/includes/libs/ArrayUtils.php
b/includes/libs/ArrayUtils.php
index
f934021
..
2156bd7
100644
(file)
--- a/
includes/libs/ArrayUtils.php
+++ b/
includes/libs/ArrayUtils.php
@@
-28,7
+28,7
@@
class ArrayUtils {
/**
* Sort the given array in a pseudo-random order which depends only on the
class ArrayUtils {
/**
* Sort the given array in a pseudo-random order which depends only on the
- * given key and each element value. This is typically used for load
+ * given key and each element value
in $array
. This is typically used for load
* balancing between servers each with a local cache.
*
* Keys are preserved. The input array is modified in place.
* balancing between servers each with a local cache.
*
* Keys are preserved. The input array is modified in place.
@@
-47,7
+47,7
@@
class ArrayUtils {
* function was introduced.
*/
public static function consistentHashSort( &$array, $key, $separator = "\000" ) {
* function was introduced.
*/
public static function consistentHashSort( &$array, $key, $separator = "\000" ) {
- $hashes =
array()
;
+ $hashes =
[]
;
foreach ( $array as $elt ) {
$hashes[$elt] = md5( $elt . $separator . $key );
}
foreach ( $array as $elt ) {
$hashes[$elt] = md5( $elt . $separator . $key );
}
@@
-158,11
+158,11
@@
class ArrayUtils {
public static function arrayDiffAssocRecursive( $array1 ) {
$arrays = func_get_args();
array_shift( $arrays );
public static function arrayDiffAssocRecursive( $array1 ) {
$arrays = func_get_args();
array_shift( $arrays );
- $ret =
array()
;
+ $ret =
[]
;
foreach ( $array1 as $key => $value ) {
if ( is_array( $value ) ) {
foreach ( $array1 as $key => $value ) {
if ( is_array( $value ) ) {
- $args =
array( $value )
;
+ $args =
[ $value ]
;
foreach ( $arrays as $array ) {
if ( isset( $array[$key] ) ) {
$args[] = $array[$key];
foreach ( $arrays as $array ) {
if ( isset( $array[$key] ) ) {
$args[] = $array[$key];