Umherirrender has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/250321

Change subject: phpcs: Fix some "Single space expected before elseif"
......................................................................

phpcs: Fix some "Single space expected before elseif"

Found by new version of mediawiki/codesniffer
https://integration.wikimedia.org/ci/job/mediawiki-core-phpcs/1939/consoleFull

Change-Id: I465bf0d1c89603b3dfc9867be3c0b1190829312d
---
M includes/search/SearchOracle.php
M includes/search/SearchPostgres.php
M maintenance/backupTextPass.inc
3 files changed, 10 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/21/250321/1

diff --git a/includes/search/SearchOracle.php b/includes/search/SearchOracle.php
index 5821148..6dad342 100644
--- a/includes/search/SearchOracle.php
+++ b/includes/search/SearchOracle.php
@@ -191,8 +191,7 @@
                                        foreach ( $temp_terms as $t ) {
                                                $searchon .= ( $terms[1] == '-' 
? ' ~' : ' & ' ) . $this->escapeTerm( $t );
                                        }
-                               }
-                               else {
+                               } else {
                                        $searchon .= ( $terms[1] == '-' ? ' ~' 
: ' & ' ) . $this->escapeTerm( $terms[2] );
                                }
                                if ( !empty( $terms[3] ) ) {
diff --git a/includes/search/SearchPostgres.php 
b/includes/search/SearchPostgres.php
index 60c4249..649ef4f 100644
--- a/includes/search/SearchPostgres.php
+++ b/includes/search/SearchPostgres.php
@@ -84,14 +84,11 @@
                                }
                                if ( strtolower( $terms[2] ) === 'and' ) {
                                        $searchstring .= ' & ';
-                               }
-                               elseif ( strtolower( $terms[2] ) === 'or' || 
$terms[2] === '|' ) {
+                               } elseif ( strtolower( $terms[2] ) === 'or' || 
$terms[2] === '|' ) {
                                        $searchstring .= ' | ';
-                               }
-                               elseif ( strtolower( $terms[2] ) === 'not' ) {
+                               } elseif ( strtolower( $terms[2] ) === 'not' ) {
                                        $searchstring .= ' & !';
-                               }
-                               else {
+                               } else {
                                        $searchstring .= " & $terms[2]";
                                }
                        }
@@ -147,8 +144,7 @@
                        $query = "SELECT page_id, page_namespace, page_title, 0 
AS score " .
                                "FROM page p, revision r, pagecontent c WHERE 
p.page_latest = r.rev_id " .
                                "AND r.rev_text_id = c.old_id AND 1=0";
-               }
-               else {
+               } else {
                        $m = array();
                        if ( preg_match_all( "/'([^']+)'/", $top, $m, 
PREG_SET_ORDER ) ) {
                                foreach ( $m as $terms ) {
@@ -157,9 +153,9 @@
                        }
 
                        $query = "SELECT page_id, page_namespace, page_title, " 
.
-                       "ts_rank($fulltext, to_tsquery($searchstring), 5) AS 
score " .
-                       "FROM page p, revision r, pagecontent c WHERE 
p.page_latest = r.rev_id " .
-                       "AND r.rev_text_id = c.old_id AND $fulltext @@ 
to_tsquery($searchstring)";
+                               "ts_rank($fulltext, to_tsquery($searchstring), 
5) AS score " .
+                               "FROM page p, revision r, pagecontent c WHERE 
p.page_latest = r.rev_id " .
+                               "AND r.rev_text_id = c.old_id AND $fulltext @@ 
to_tsquery($searchstring)";
                }
 
                # # Namespaces - defaults to 0
diff --git a/maintenance/backupTextPass.inc b/maintenance/backupTextPass.inc
index 0ed584c..0562333 100644
--- a/maintenance/backupTextPass.inc
+++ b/maintenance/backupTextPass.inc
@@ -899,11 +899,9 @@
                        } elseif ( $this->state == "page" ) {
                                $this->thisPage .= $data;
                        }
-               }
-               elseif ( $this->lastName == "model" ) {
+               } elseif ( $this->lastName == "model" ) {
                        $this->thisRevModel .= $data;
-               }
-               elseif ( $this->lastName == "format" ) {
+               } elseif ( $this->lastName == "format" ) {
                        $this->thisRevFormat .= $data;
                }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/250321
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I465bf0d1c89603b3dfc9867be3c0b1190829312d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to