X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fsite%2FSiteList.php;h=a94aa0b93b477871467916b688a81a4ad77c42ab;hb=2e7f4e48735b0e916336d9166cb1ab1756e0fa9f;hp=69924500ca32cd0c4a49712346c478395727121c;hpb=82b8b578938bf75bc9fa924aa95b10955d49ec6f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/site/SiteList.php b/includes/site/SiteList.php index 69924500ca..a94aa0b93b 100644 --- a/includes/site/SiteList.php +++ b/includes/site/SiteList.php @@ -27,7 +27,6 @@ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ class SiteList extends GenericArrayObject { - /** * Internal site identifiers pointing to their sites offset value. * @@ -35,7 +34,7 @@ class SiteList extends GenericArrayObject { * * @var array Array of integer */ - protected $byInternalId = array(); + protected $byInternalId = []; /** * Global site identifiers pointing to their sites offset value. @@ -44,7 +43,7 @@ class SiteList extends GenericArrayObject { * * @var array Array of string */ - protected $byGlobalId = array(); + protected $byGlobalId = []; /** * Navigational site identifiers alias inter-language prefixes @@ -54,7 +53,7 @@ class SiteList extends GenericArrayObject { * * @var array Array of string */ - protected $byNavigationId = array(); + protected $byNavigationId = []; /** * @see GenericArrayObject::getObjectType @@ -176,7 +175,7 @@ class SiteList extends GenericArrayObject { * @return bool */ public function isEmpty() { - return $this->byGlobalId === array(); + return $this->byGlobalId === []; } /** @@ -278,7 +277,7 @@ class SiteList extends GenericArrayObject { $group = new self(); /** - * @var \Site $site + * @var Site $site */ foreach ( $this as $site ) { if ( $site->getGroup() === $groupName ) { @@ -320,15 +319,15 @@ class SiteList extends GenericArrayObject { * @return array */ protected function getSerializationData() { - //NOTE: When changing the structure, either implement unserialize() to handle the + // NOTE: When changing the structure, either implement unserialize() to handle the // old structure too, or update SERIAL_VERSION_ID to kill any caches. return array_merge( parent::getSerializationData(), - array( + [ 'internalIds' => $this->byInternalId, 'globalIds' => $this->byGlobalId, 'navigationIds' => $this->byNavigationId - ) + ] ); } @@ -350,10 +349,4 @@ class SiteList extends GenericArrayObject { return $serializationData; } - } - -/** - * @deprecated - */ -class SiteArray extends SiteList {}