From 8c98f517782610282564116b1c67ff4c4c7e0a63 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Fri, 5 Apr 2019 23:19:29 -0700 Subject: [PATCH] Fix PhanUnextractableAnnotation* errors (#7) Change-Id: I8194a7b9c9abce951002590030913706e9bd743e --- .phan/config.php | 4 ---- includes/MovePage.php | 4 ++-- includes/OutputPage.php | 2 +- includes/htmlform/fields/HTMLSelectAndOtherField.php | 2 +- includes/libs/IP.php | 6 +++--- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.phan/config.php b/.phan/config.php index 44ebedc506..37b21531bf 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -147,10 +147,6 @@ $cfg['suppress_issue_types'] = array_merge( $cfg['suppress_issue_types'], [ "PhanUndeclaredVariableAssignOp", // approximate error count: 55 "PhanUndeclaredVariableDim", - // approximate error count: 3 - "PhanUnextractableAnnotationElementName", - // approximate error count: 4 - "PhanUnextractableAnnotationSuffix", ] ); $cfg['ignore_undeclared_variables_in_global_scope'] = true; diff --git a/includes/MovePage.php b/includes/MovePage.php index db5750a1be..2edd669f13 100644 --- a/includes/MovePage.php +++ b/includes/MovePage.php @@ -427,8 +427,8 @@ class MovePage { * Can also be used to revert after a DB failure. * * @private - * @param Title Old location to move the file from. - * @param Title New location to move the file to. + * @param Title $oldTitle Old location to move the file from. + * @param Title $newTitle New location to move the file to. * @return Status */ private function moveFile( $oldTitle, $newTitle ) { diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 786ecc4a93..cb3f1ad203 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2187,7 +2187,7 @@ class OutputPage extends ContextSource { * Parse wikitext and return the HTML (internal implementation helper) * * @param string $text - * @param Title The title to use + * @param Title $title The title to use * @param bool $linestart Is this the start of a line? * @param bool $tidy Whether the output should be tidied * @param bool $interface Use interface language (instead of content language) while parsing diff --git a/includes/htmlform/fields/HTMLSelectAndOtherField.php b/includes/htmlform/fields/HTMLSelectAndOtherField.php index 4e64e9d7cb..f137bf1085 100644 --- a/includes/htmlform/fields/HTMLSelectAndOtherField.php +++ b/includes/htmlform/fields/HTMLSelectAndOtherField.php @@ -144,7 +144,7 @@ class HTMLSelectAndOtherField extends HTMLSelectField { /** * @param WebRequest $request * - * @return array("","",""] */ public function loadDataFromRequest( $request ) { if ( $request->getCheck( $this->mName ) ) { diff --git a/includes/libs/IP.php b/includes/libs/IP.php index 8efcd1589b..da525e71cd 100644 --- a/includes/libs/IP.php +++ b/includes/libs/IP.php @@ -467,7 +467,7 @@ class IP { * to an integer network and a number of bits * * @param string $range IP with CIDR prefix - * @return array(int or string, int) + * @return array [int or string, int] */ public static function parseCIDR( $range ) { if ( self::isIPv6( $range ) ) { @@ -557,7 +557,7 @@ class IP { * * @param string $range * - * @return array(string, int) + * @return array [string, int] */ private static function parseCIDR6( $range ) { # Explode into @@ -598,7 +598,7 @@ class IP { * * @param string $range * - * @return array(string, string) + * @return array [string, string] */ private static function parseRange6( $range ) { # Expand any IPv6 IP -- 2.20.1