X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FActorMigration.php;h=5dde8a04d41b16dcb0f40ba3ccd36bad498775f4;hb=c05b8b7c473a7dd9c832f91366c45cb8a35c2df2;hp=0c33eb9bfcfbfb0e82999f52330416c3fc2f58a4;hpb=3d98b80a3901a4f843af38066f4f1538ec635976;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/ActorMigration.php b/includes/ActorMigration.php index 0c33eb9bfc..5dde8a04d4 100644 --- a/includes/ActorMigration.php +++ b/includes/ActorMigration.php @@ -136,11 +136,7 @@ class ActorMigration { * @return string[] [ $text, $actor ] */ private static function getFieldNames( $key ) { - if ( isset( self::$specialFields[$key] ) ) { - return self::$specialFields[$key]; - } - - return [ $key . '_text', substr( $key, 0, -5 ) . '_actor' ]; + return self::$specialFields[$key] ?? [ $key . '_text', substr( $key, 0, -5 ) . '_actor' ]; } /** @@ -148,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] ) ) {