From d18c861aa914a96a89969fd685d4145a049453fd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerg=C5=91=20Tisza?= Date: Wed, 3 Jul 2019 15:45:01 +0200 Subject: [PATCH] Improve documentation of getJoin() methods for static analysis Change-Id: I3943b4b4a630777d06d1689714d8f36c4430cd24 --- includes/ActorMigration.php | 3 ++- includes/CommentStore.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/ActorMigration.php b/includes/ActorMigration.php index 597b8e76e7..5dde8a04d4 100644 --- a/includes/ActorMigration.php +++ b/includes/ActorMigration.php @@ -144,11 +144,12 @@ class ActorMigration { * * @param string $key A key such as "rev_user" identifying the actor * field being fetched. - * @return array With three keys: + * @return array[] With three keys: * - tables: (string[]) to include in the `$table` to `IDatabase->select()` * - fields: (string[]) to include in the `$vars` to `IDatabase->select()` * - joins: (array) to include in the `$join_conds` to `IDatabase->select()` * All tables, fields, and joins are aliased, so `+` is safe to use. + * @phan-return array{tables:string[],fields:string[],joins:array} */ public function getJoin( $key ) { if ( !isset( $this->joinCache[$key] ) ) { diff --git a/includes/CommentStore.php b/includes/CommentStore.php index 4a673c442e..994a064f2c 100644 --- a/includes/CommentStore.php +++ b/includes/CommentStore.php @@ -197,7 +197,7 @@ class CommentStore { * @since 1.31 Method signature changed, $key parameter added (with deprecated back compat) * @param string|null $key A key such as "rev_comment" identifying the comment * field being fetched. - * @return array With three keys: + * @return array[] With three keys: * - tables: (string[]) to include in the `$table` to `IDatabase->select()` * - fields: (string[]) to include in the `$vars` to `IDatabase->select()` * - joins: (array) to include in the `$join_conds` to `IDatabase->select()` -- 2.20.1