Fix PhanTypeMismatchDeclaredParam
[lhc/web/wiklou.git] / includes / pager / IndexPager.php
index 6880d58..b00ec3a 100644 (file)
@@ -381,9 +381,9 @@ abstract class IndexPager extends ContextSource implements Pager {
                $info = $this->getQueryInfo();
                $tables = $info['tables'];
                $fields = $info['fields'];
-               $conds = isset( $info['conds'] ) ? $info['conds'] : [];
-               $options = isset( $info['options'] ) ? $info['options'] : [];
-               $join_conds = isset( $info['join_conds'] ) ? $info['join_conds'] : [];
+               $conds = $info['conds'] ?? [];
+               $options = $info['options'] ?? [];
+               $join_conds = $info['join_conds'] ?? [];
                $sortColumns = array_merge( [ $this->mIndexField ], $this->mExtraSortFields );
                if ( $descending ) {
                        $options['ORDER BY'] = $sortColumns;
@@ -456,8 +456,8 @@ abstract class IndexPager extends ContextSource implements Pager {
         * Make a self-link
         *
         * @param string $text Text displayed on the link
-        * @param array $query Associative array of parameter to be in the query string
-        * @param string $type Link type used to create additional attributes, like "rel", "class" or
+        * @param array|null $query Associative array of parameter to be in the query string
+        * @param string|null $type Link type used to create additional attributes, like "rel", "class" or
         *  "title". Valid values (non-exhaustive list): 'first', 'last', 'prev', 'next', 'asc', 'desc'.
         * @return string HTML fragment
         */