jenkins-bot has submitted this change and it was merged.
Change subject: Static analysis cleanup
......................................................................
Static analysis cleanup
Change-Id: I8240b41a50b97175ffb086f862c337afe3d899c4
---
M includes/BuildDocument/PageTextBuilder.php
M includes/BuildDocument/RedirectsAndIncomingLinks.php
M includes/ElasticsearchIntermediary.php
M includes/Hooks.php
M includes/Sanity/Checker.php
5 files changed, 8 insertions(+), 4 deletions(-)
Approvals:
EBernhardson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/BuildDocument/PageTextBuilder.php
b/includes/BuildDocument/PageTextBuilder.php
index 679630d..424161c 100644
--- a/includes/BuildDocument/PageTextBuilder.php
+++ b/includes/BuildDocument/PageTextBuilder.php
@@ -107,6 +107,7 @@
switch ( $wgCirrusSearchBoostOpening ) {
case 'first_heading':
$opening = $this->extractHeadingBeforeFirstHeading(
$text );
+ break;
case 'none':
break;
default:
diff --git a/includes/BuildDocument/RedirectsAndIncomingLinks.php
b/includes/BuildDocument/RedirectsAndIncomingLinks.php
index c27dff6..871df04 100644
--- a/includes/BuildDocument/RedirectsAndIncomingLinks.php
+++ b/includes/BuildDocument/RedirectsAndIncomingLinks.php
@@ -60,7 +60,9 @@
if ( !isset( self::$externalLinks[$conn] ) ) {
self::$externalLinks[$conn] = new self( $conn );
}
- self::$externalLinks[$conn]->realBuildDocument( $doc, $title );
+ /** @var self $externalLink */
+ $externalLink = self::$externalLinks[$conn];
+ $externalLink->realBuildDocument( $doc, $title );
return true;
}
diff --git a/includes/ElasticsearchIntermediary.php
b/includes/ElasticsearchIntermediary.php
index e8d3658..53fc182 100644
--- a/includes/ElasticsearchIntermediary.php
+++ b/includes/ElasticsearchIntermediary.php
@@ -561,7 +561,7 @@
* @return boolean is this a parse error?
*/
protected function isParseError( $status ) {
- foreach ( $status->getErrorsArray( 'message' ) as $errorMessage
) {
+ foreach ( $status->getErrorsArray() as $errorMessage ) {
if ( $errorMessage[ 0 ] === 'cirrussearch-parse-error'
) {
return true;
}
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 72d7f83..e4c242d 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -724,8 +724,8 @@
/**
* @param string $term
- * @param SearchResultSet &$titleMatches
- * @param SearchResultSet &$textMatches
+ * @param \SearchResultSet &$titleMatches
+ * @param \SearchResultSet &$textMatches
*/
public static function onSpecialSearchResults( $term, &$titleMatches,
&$textMatches ) {
global $wgOut;
diff --git a/includes/Sanity/Checker.php b/includes/Sanity/Checker.php
index 5e58517..f31efef 100644
--- a/includes/Sanity/Checker.php
+++ b/includes/Sanity/Checker.php
@@ -90,6 +90,7 @@
if ( $inIndex ) {
$foundInsanityInIndex = false;
$expectedType =
$this->connection->getIndexSuffixForNamespace(
$page->getTitle()->getNamespace() );
+ /** @var IndexInfo $indexInfo */
foreach ( $fromIndex as $indexInfo ) {
$matches = array();
if ( !preg_match(
'/_(.+)_.+$/', $indexInfo->getIndex(), $matches ) ) {
--
To view, visit https://gerrit.wikimedia.org/r/284843
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8240b41a50b97175ffb086f862c337afe3d899c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
Gerrit-Reviewer: DCausse <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Gehel <[email protected]>
Gerrit-Reviewer: Manybubbles <[email protected]>
Gerrit-Reviewer: Smalyshev <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits