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 "resourceloader: Clean up ResourceLoaderWikiModuleTest"
[lhc/web/wiklou.git]
/
includes
/
site
/
SiteList.php
diff --git
a/includes/site/SiteList.php
b/includes/site/SiteList.php
index
6992450
..
726ab46
100644
(file)
--- a/
includes/site/SiteList.php
+++ b/
includes/site/SiteList.php
@@
-23,11
+23,10
@@
* @file
* @ingroup Site
*
* @file
* @ingroup Site
*
- * @license G
NU GPL v2+
+ * @license G
PL-2.0-or-later
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
*/
class SiteList extends GenericArrayObject {
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
*/
class SiteList extends GenericArrayObject {
-
/**
* Internal site identifiers pointing to their sites offset value.
*
/**
* Internal site identifiers pointing to their sites offset value.
*
@@
-35,7
+34,7
@@
class SiteList extends GenericArrayObject {
*
* @var array Array of integer
*/
*
* @var array Array of integer
*/
- protected $byInternalId =
array()
;
+ protected $byInternalId =
[]
;
/**
* Global site identifiers pointing to their sites offset value.
/**
* Global site identifiers pointing to their sites offset value.
@@
-44,7
+43,7
@@
class SiteList extends GenericArrayObject {
*
* @var array Array of string
*/
*
* @var array Array of string
*/
- protected $byGlobalId =
array()
;
+ protected $byGlobalId =
[]
;
/**
* Navigational site identifiers alias inter-language prefixes
/**
* Navigational site identifiers alias inter-language prefixes
@@
-54,7
+53,7
@@
class SiteList extends GenericArrayObject {
*
* @var array Array of string
*/
*
* @var array Array of string
*/
- protected $byNavigationId =
array()
;
+ protected $byNavigationId =
[]
;
/**
* @see GenericArrayObject::getObjectType
/**
* @see GenericArrayObject::getObjectType
@@
-64,7
+63,7
@@
class SiteList extends GenericArrayObject {
* @return string
*/
public function getObjectType() {
* @return string
*/
public function getObjectType() {
- return
'Site'
;
+ return
Site::class
;
}
/**
}
/**
@@
-176,7
+175,7
@@
class SiteList extends GenericArrayObject {
* @return bool
*/
public function isEmpty() {
* @return bool
*/
public function isEmpty() {
- return $this->byGlobalId ===
array()
;
+ return $this->byGlobalId ===
[]
;
}
/**
}
/**
@@
-278,7
+277,7
@@
class SiteList extends GenericArrayObject {
$group = new self();
/**
$group = new self();
/**
- * @var
\
Site $site
+ * @var Site $site
*/
foreach ( $this as $site ) {
if ( $site->getGroup() === $groupName ) {
*/
foreach ( $this as $site ) {
if ( $site->getGroup() === $groupName ) {
@@
-320,15
+319,15
@@
class SiteList extends GenericArrayObject {
* @return array
*/
protected function getSerializationData() {
* @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(),
// 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
'internalIds' => $this->byInternalId,
'globalIds' => $this->byGlobalId,
'navigationIds' => $this->byNavigationId
- )
+ ]
);
}
);
}
@@
-350,10
+349,4
@@
class SiteList extends GenericArrayObject {
return $serializationData;
}
return $serializationData;
}
-
}
}
-
-/**
- * @deprecated
- */
-class SiteArray extends SiteList {}