From 29737562b2d4a475e91cb34ffca0fa4aacad982f Mon Sep 17 00:00:00 2001 From: Leszek Manicki Date: Wed, 14 Dec 2016 11:07:42 +0100 Subject: [PATCH] Fix assigning void return value to a variable Change-Id: I1e675d121938c5b6b7f8165681c645154e3a70d0 --- includes/specials/SpecialDeletedContributions.php | 2 +- includes/specials/SpecialMIMEsearch.php | 2 +- includes/specials/SpecialNewimages.php | 2 +- tests/phan/config.php | 2 -- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/includes/specials/SpecialDeletedContributions.php b/includes/specials/SpecialDeletedContributions.php index 2936754988..5c8b3a6206 100644 --- a/includes/specials/SpecialDeletedContributions.php +++ b/includes/specials/SpecialDeletedContributions.php @@ -206,7 +206,7 @@ class DeletedContributionsPage extends SpecialPage { ], ]; - $form = HTMLForm::factory( 'ooui', $formDescriptor, $this->getContext() ) + HTMLForm::factory( 'ooui', $formDescriptor, $this->getContext() ) ->setWrapperLegendMsg( 'sp-contributions-search' ) ->setSubmitTextMsg( 'sp-contributions-submit' ) // prevent setting subpage and 'target' parameter at the same time diff --git a/includes/specials/SpecialMIMEsearch.php b/includes/specials/SpecialMIMEsearch.php index c61609dec5..d8a468f333 100644 --- a/includes/specials/SpecialMIMEsearch.php +++ b/includes/specials/SpecialMIMEsearch.php @@ -119,7 +119,7 @@ class MIMEsearchPage extends QueryPage { ], ]; - $form = HTMLForm::factory( 'ooui', $formDescriptor, $this->getContext() ) + HTMLForm::factory( 'ooui', $formDescriptor, $this->getContext() ) ->setWrapperLegendMsg( 'mimesearch' ) ->setSubmitTextMsg( 'ilsubmit' ) ->setAction( $this->getPageTitle()->getLocalURL() ) diff --git a/includes/specials/SpecialNewimages.php b/includes/specials/SpecialNewimages.php index 077a5d21f6..9e3a7509bc 100644 --- a/includes/specials/SpecialNewimages.php +++ b/includes/specials/SpecialNewimages.php @@ -108,7 +108,7 @@ class SpecialNewFiles extends IncludableSpecialPage { unset( $formDescriptor['hidepatrolled'] ); } - $form = HTMLForm::factory( 'ooui', $formDescriptor, $this->getContext() ) + HTMLForm::factory( 'ooui', $formDescriptor, $this->getContext() ) ->setWrapperLegendMsg( 'newimages-legend' ) ->setSubmitTextMsg( 'ilsubmit' ) ->setMethod( 'get' ) diff --git a/tests/phan/config.php b/tests/phan/config.php index 7dcc5c49f5..251336a068 100644 --- a/tests/phan/config.php +++ b/tests/phan/config.php @@ -341,8 +341,6 @@ return [ "PhanTypeMissingReturn", // approximate error count: 5 "PhanTypeNonVarPassByRef", - // approximate error count: 3 - "PhanTypeVoidAssignment", // approximate error count: 27 "PhanUndeclaredConstant", // approximate error count: 185 -- 2.20.1