Improve documentation of getJoin() methods for static analysis
authorGergő Tisza <tgr.huwiki@gmail.com>
Wed, 3 Jul 2019 13:45:01 +0000 (15:45 +0200)
committerGergő Tisza <tgr.huwiki@gmail.com>
Wed, 3 Jul 2019 13:45:01 +0000 (15:45 +0200)
Change-Id: I3943b4b4a630777d06d1689714d8f36c4430cd24

includes/ActorMigration.php
includes/CommentStore.php

index 597b8e7..5dde8a0 100644 (file)
@@ -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] ) ) {
index 4a673c4..994a064 100644 (file)
@@ -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()`