Braces, spaces, documentation
authorSam Reed <reedy@users.mediawiki.org>
Sun, 20 Nov 2011 18:02:38 +0000 (18:02 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sun, 20 Nov 2011 18:02:38 +0000 (18:02 +0000)
includes/Title.php
includes/search/SearchEngine.php
maintenance/Maintenance.php

index d4abcbb..4048e5f 100644 (file)
@@ -4278,7 +4278,7 @@ class Title {
        /**
         * Get a backlink cache object
         *
-        * @return object BacklinkCache
+        * @return BacklinkCache
         */
        function getBacklinkCache() {
                if ( is_null( $this->mBacklinkCache ) ) {
index e6991a1..b09373f 100644 (file)
@@ -1203,22 +1203,27 @@ class SearchHighlighter {
         * @return String
         */
        function extract( $text, $start, $end, &$posStart = null, &$posEnd = null ) {
-               if ( $start != 0 )
+               if ( $start != 0 ) {
                        $start = $this->position( $text, $start, 1 );
-               if ( $end >= strlen( $text ) )
+               }
+               if ( $end >= strlen( $text ) ) {
                        $end = strlen( $text );
-               else
+               } else {
                        $end = $this->position( $text, $end );
+               }
 
-               if ( !is_null( $posStart ) )
+               if ( !is_null( $posStart ) ) {
                        $posStart = $start;
-               if ( !is_null( $posEnd ) )
+               }
+               if ( !is_null( $posEnd ) ) {
                        $posEnd = $end;
+               }
 
-               if ( $end > $start )
+               if ( $end > $start )  {
                        return substr( $text, $start, $end - $start );
-               else
+               } else {
                        return '';
+               }
        }
 
        /**
index c4e672f..5de10e6 100644 (file)
@@ -314,8 +314,7 @@ abstract class Maintenance {
                        } else {
                                print( $out );
                        }
-               }
-               else {
+               } else {
                        $out = preg_replace( '/\n\z/', '', $out );
                        $this->outputChanneled( $out, $channel );
                }