Moved $wgQueryPages stuff out of the global scope and into a function
[lhc/web/wiklou.git] / includes / diff / TableDiffFormatter.php
index 5f28627..ac8f758 100644 (file)
@@ -31,6 +31,7 @@
  * @ingroup DifferenceEngine
  */
 class TableDiffFormatter extends DiffFormatter {
+
        function __construct() {
                $this->leadingContextLines = 2;
                $this->trailingContextLines = 2;
@@ -38,7 +39,8 @@ class TableDiffFormatter extends DiffFormatter {
 
        /**
         * @static
-        * @param $msg
+        * @param string $msg
+        *
         * @return mixed
         */
        public static function escapeWhiteSpace( $msg ) {
@@ -50,10 +52,11 @@ class TableDiffFormatter extends DiffFormatter {
        }
 
        /**
-        * @param $xbeg
-        * @param $xlen
-        * @param $ybeg
-        * @param $ylen
+        * @param int $xbeg
+        * @param int $xlen
+        * @param int $ybeg
+        * @param int $ylen
+        *
         * @return string
         */
        protected function blockHeader( $xbeg, $xlen, $ybeg, $ylen ) {
@@ -64,7 +67,9 @@ class TableDiffFormatter extends DiffFormatter {
        }
 
        /**
-        * @param $header
+        * Writes the header to the output buffer.
+        *
+        * @param string $header
         */
        protected function startBlock( $header ) {
                echo $header;
@@ -73,12 +78,19 @@ class TableDiffFormatter extends DiffFormatter {
        protected function endBlock() {
        }
 
+       /**
+        * @param string[] $lines
+        * @param string $prefix
+        * @param string $color
+        */
        protected function lines( $lines, $prefix = ' ', $color = 'white' ) {
        }
 
        /**
         * HTML-escape parameter before calling this
-        * @param $line
+        *
+        * @param string $line
+        *
         * @return string
         */
        protected function addedLine( $line ) {
@@ -87,7 +99,9 @@ class TableDiffFormatter extends DiffFormatter {
 
        /**
         * HTML-escape parameter before calling this
-        * @param $line
+        *
+        * @param string $line
+        *
         * @return string
         */
        protected function deletedLine( $line ) {
@@ -96,7 +110,9 @@ class TableDiffFormatter extends DiffFormatter {
 
        /**
         * HTML-escape parameter before calling this
-        * @param $line
+        *
+        * @param string $line
+        *
         * @return string
         */
        protected function contextLine( $line ) {
@@ -104,9 +120,10 @@ class TableDiffFormatter extends DiffFormatter {
        }
 
        /**
-        * @param $marker
-        * @param $class
-        * @param $line
+        * @param string $marker
+        * @param string $class Unused
+        * @param string $line
+        *
         * @return string
         */
        protected function wrapLine( $marker, $class, $line ) {
@@ -126,7 +143,9 @@ class TableDiffFormatter extends DiffFormatter {
        }
 
        /**
-        * @param $lines array
+        * Writes all lines to the output buffer, each enclosed in <tr>.
+        *
+        * @param string[] $lines
         */
        protected function added( $lines ) {
                foreach ( $lines as $line ) {
@@ -137,7 +156,9 @@ class TableDiffFormatter extends DiffFormatter {
        }
 
        /**
-        * @param $lines
+        * Writes all lines to the output buffer, each enclosed in <tr>.
+        *
+        * @param string[] $lines
         */
        protected function deleted( $lines ) {
                foreach ( $lines as $line ) {
@@ -148,7 +169,9 @@ class TableDiffFormatter extends DiffFormatter {
        }
 
        /**
-        * @param $lines
+        * Writes all lines to the output buffer, each enclosed in <tr>.
+        *
+        * @param string[] $lines
         */
        protected function context( $lines ) {
                foreach ( $lines as $line ) {
@@ -159,8 +182,10 @@ class TableDiffFormatter extends DiffFormatter {
        }
 
        /**
-        * @param $orig
-        * @param $closing
+        * Writes the two sets of lines to the output buffer, each enclosed in <tr>.
+        *
+        * @param string[] $orig
+        * @param string[] $closing
         */
        protected function changed( $orig, $closing ) {
                wfProfileIn( __METHOD__ );
@@ -183,4 +208,5 @@ class TableDiffFormatter extends DiffFormatter {
                }
                wfProfileOut( __METHOD__ );
        }
+
 }