Merge "Salt the "nsToken" used for Special:Search namespace remembering"
[lhc/web/wiklou.git] / includes / search / SearchResult.php
index 153590a..56ae2ff 100644 (file)
@@ -45,14 +45,14 @@ class SearchResult {
        protected $mTitle;
 
        /**
-        * @var String
+        * @var string
         */
        protected $mText;
 
        /**
         * Return a new SearchResult and initializes it with a title.
         *
-        * @param $title Title
+        * @param Title $title
         * @return SearchResult
         */
        public static function newFromTitle( $title ) {
@@ -64,7 +64,7 @@ class SearchResult {
        /**
         * Return a new SearchResult and initializes it with a row.
         *
-        * @param $row object
+        * @param object $row
         * @return SearchResult
         */
        public static function newFromRow( $row ) {
@@ -84,7 +84,7 @@ class SearchResult {
         * Initialize from a database row. Makes a Title and passes that to
         * initFromTitle.
         *
-        * @param $row object
+        * @param object $row
         */
        protected function initFromRow( $row ) {
                $this->initFromTitle( Title::makeTitle( $row->page_namespace, $row->page_title ) );
@@ -94,7 +94,7 @@ class SearchResult {
         * Initialize from a Title and if possible initializes a corresponding
         * Revision and File.
         *
-        * @param $title Title
+        * @param Title $title
         */
        protected function initFromTitle( $title ) {
                $this->mTitle = $title;
@@ -112,7 +112,7 @@ class SearchResult {
        /**
         * Check if this is result points to an invalid title
         *
-        * @return Boolean
+        * @return bool
         */
        function isBrokenTitle() {
                return is_null( $this->mTitle );
@@ -121,7 +121,7 @@ class SearchResult {
        /**
         * Check if target page is missing, happens when index is out of date
         *
-        * @return Boolean
+        * @return bool
         */
        function isMissingRevision() {
                return !$this->mRevision && !$this->mImage;
@@ -143,7 +143,7 @@ class SearchResult {
        }
 
        /**
-        * @return float|null if not supported
+        * @return float|null If not supported
         */
        function getScore() {
                return null;
@@ -164,8 +164,8 @@ class SearchResult {
        }
 
        /**
-        * @param array $terms terms to highlight
-        * @return String: highlighted text snippet, null (and not '') if not supported
+        * @param array $terms Terms to highlight
+        * @return string Highlighted text snippet, null (and not '') if not supported
         */
        function getTextSnippet( $terms ) {
                global $wgAdvancedSearchHighlighting;
@@ -182,42 +182,42 @@ class SearchResult {
        }
 
        /**
-        * @return String: highlighted title, '' if not supported
+        * @return string Highlighted title, '' if not supported
         */
        function getTitleSnippet() {
                return '';
        }
 
        /**
-        * @return String: highlighted redirect name (redirect to this page), '' if none or not supported
+        * @return string Highlighted redirect name (redirect to this page), '' if none or not supported
         */
        function getRedirectSnippet() {
                return '';
        }
 
        /**
-        * @return Title object for the redirect to this page, null if none or not supported
+        * @return Title Title object for the redirect to this page, null if none or not supported
         */
        function getRedirectTitle() {
                return null;
        }
 
        /**
-        * @return string highlighted relevant section name, null if none or not supported
+        * @return string Highlighted relevant section name, null if none or not supported
         */
        function getSectionSnippet() {
                return '';
        }
 
        /**
-        * @return Title object (pagename+fragment) for the section, null if none or not supported
+        * @return Title Title object (pagename+fragment) for the section, null if none or not supported
         */
        function getSectionTitle() {
                return null;
        }
 
        /**
-        * @return String: timestamp
+        * @return string timestamp
         */
        function getTimestamp() {
                if ( $this->mRevision ) {
@@ -229,7 +229,7 @@ class SearchResult {
        }
 
        /**
-        * @return Integer: number of words
+        * @return int Number of words
         */
        function getWordCount() {
                $this->initText();
@@ -237,7 +237,7 @@ class SearchResult {
        }
 
        /**
-        * @return Integer: size in bytes
+        * @return int Size in bytes
         */
        function getByteSize() {
                $this->initText();
@@ -245,21 +245,21 @@ class SearchResult {
        }
 
        /**
-        * @return Boolean if hit has related articles
+        * @return bool If hit has related articles
         */
        function hasRelated() {
                return false;
        }
 
        /**
-        * @return String: interwiki prefix of the title (return iw even if title is broken)
+        * @return string Interwiki prefix of the title (return iw even if title is broken)
         */
        function getInterwikiPrefix() {
                return '';
        }
 
        /**
-        * @return string interwiki namespace of the title (since we likely can't resolve it locally)
+        * @return string Interwiki namespace of the title (since we likely can't resolve it locally)
         */
        function getInterwikiNamespaceText() {
                return '';
@@ -267,6 +267,7 @@ class SearchResult {
 
        /**
         * Did this match file contents (eg: PDF/DJVU)?
+        * @return bool
         */
        function isFileMatch() {
                return false;