aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api/ApiPageSet.php
diff options
context:
space:
mode:
authorthiemowmde <thiemo.kreuz@wikimedia.de>2024-01-08 10:16:39 +0100
committerthiemowmde <thiemo.kreuz@wikimedia.de>2024-01-08 10:16:39 +0100
commitf94d18b459e5a10fa4c2b43066669756f09dcd94 (patch)
treedb5a743d47cc3c608ca02171d65b6554f9311102 /includes/api/ApiPageSet.php
parentc6251dc80624470407d549fc00777a46f473d170 (diff)
downloadmediawikicore-f94d18b459e5a10fa4c2b43066669756f09dcd94.tar.gz
mediawikicore-f94d18b459e5a10fa4c2b43066669756f09dcd94.zip
More specific array type hints in ApiPageSet
While this is technically the same as before, the array<int,…> syntax makes it more obvious that the array index is a meaningful value (e.g. a page id) and not just a meaningless sequence. Change-Id: Idc49d6f7cf43b158632115dc1b76c0cab548bc56
Diffstat (limited to 'includes/api/ApiPageSet.php')
-rw-r--r--includes/api/ApiPageSet.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php
index 75f25907f46b..e3dbe8fff79d 100644
--- a/includes/api/ApiPageSet.php
+++ b/includes/api/ApiPageSet.php
@@ -86,7 +86,7 @@ class ApiPageSet extends ApiBase {
/** @var int[][] [ns][dbkey] => page_id */
private $mGoodPages = [];
- /** @var Title[] */
+ /** @var array<int,Title> */
private $mGoodTitles = [];
/** @var int[][] [ns][dbkey] => fake page_id */
@@ -485,7 +485,7 @@ class ApiPageSet extends ApiBase {
* Title objects that were found in the database, including redirects.
* If redirects are resolved, this will include existing redirect targets.
* @deprecated since 1.37, use getGoodPages() instead.
- * @return Title[] Array page_id (int) => Title (obj)
+ * @return array<int,Title> Array page_id (int) => Title (obj)
*/
public function getGoodTitles() {
return $this->mGoodTitles;
@@ -495,7 +495,7 @@ class ApiPageSet extends ApiBase {
* Pages that were found in the database, including redirects.
* If redirects are resolved, this will include existing redirect targets.
* @since 1.37
- * @return PageIdentity[] Array page_id (int) => PageIdentity (obj)
+ * @return array<int,PageIdentity> Array page_id (int) => PageIdentity (obj)
*/
public function getGoodPages(): array {
return $this->mGoodTitles;