dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Removes 'languageshtml' property in mediawiki API's 'parse' action"
[lhc/web/wiklou.git]
/
includes
/
diff
/
TableDiffFormatter.php
diff --git
a/includes/diff/TableDiffFormatter.php
b/includes/diff/TableDiffFormatter.php
index
5f28627
..
db7318f
100644
(file)
--- a/
includes/diff/TableDiffFormatter.php
+++ b/
includes/diff/TableDiffFormatter.php
@@
-31,6
+31,7
@@
* @ingroup DifferenceEngine
*/
class TableDiffFormatter extends DiffFormatter {
* @ingroup DifferenceEngine
*/
class TableDiffFormatter extends DiffFormatter {
+
function __construct() {
$this->leadingContextLines = 2;
$this->trailingContextLines = 2;
function __construct() {
$this->leadingContextLines = 2;
$this->trailingContextLines = 2;
@@
-38,7
+39,8
@@
class TableDiffFormatter extends DiffFormatter {
/**
* @static
/**
* @static
- * @param $msg
+ * @param string $msg
+ *
* @return mixed
*/
public static function escapeWhiteSpace( $msg ) {
* @return mixed
*/
public static function escapeWhiteSpace( $msg ) {
@@
-50,13
+52,16
@@
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 ) {
* @return string
*/
protected function blockHeader( $xbeg, $xlen, $ybeg, $ylen ) {
+ // '<!--LINE \d+ -->' get replaced by a localised line number
+ // in DifferenceEngine::localiseLineNumbers
$r = '<tr><td colspan="2" class="diff-lineno"><!--LINE ' . $xbeg . "--></td>\n" .
'<td colspan="2" class="diff-lineno"><!--LINE ' . $ybeg . "--></td></tr>\n";
$r = '<tr><td colspan="2" class="diff-lineno"><!--LINE ' . $xbeg . "--></td>\n" .
'<td colspan="2" class="diff-lineno"><!--LINE ' . $ybeg . "--></td></tr>\n";
@@
-64,7
+69,9
@@
class TableDiffFormatter extends DiffFormatter {
}
/**
}
/**
- * @param $header
+ * Writes the header to the output buffer.
+ *
+ * @param string $header
*/
protected function startBlock( $header ) {
echo $header;
*/
protected function startBlock( $header ) {
echo $header;
@@
-73,12
+80,19
@@
class TableDiffFormatter extends DiffFormatter {
protected function endBlock() {
}
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
protected function lines( $lines, $prefix = ' ', $color = 'white' ) {
}
/**
* HTML-escape parameter before calling this
- * @param $line
+ *
+ * @param string $line
+ *
* @return string
*/
protected function addedLine( $line ) {
* @return string
*/
protected function addedLine( $line ) {
@@
-87,7
+101,9
@@
class TableDiffFormatter extends DiffFormatter {
/**
* HTML-escape parameter before calling this
/**
* HTML-escape parameter before calling this
- * @param $line
+ *
+ * @param string $line
+ *
* @return string
*/
protected function deletedLine( $line ) {
* @return string
*/
protected function deletedLine( $line ) {
@@
-96,7
+112,9
@@
class TableDiffFormatter extends DiffFormatter {
/**
* HTML-escape parameter before calling this
/**
* HTML-escape parameter before calling this
- * @param $line
+ *
+ * @param string $line
+ *
* @return string
*/
protected function contextLine( $line ) {
* @return string
*/
protected function contextLine( $line ) {
@@
-104,9
+122,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 ) {
* @return string
*/
protected function wrapLine( $marker, $class, $line ) {
@@
-126,7
+145,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 ) {
*/
protected function added( $lines ) {
foreach ( $lines as $line ) {
@@
-137,7
+158,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 ) {
*/
protected function deleted( $lines ) {
foreach ( $lines as $line ) {
@@
-148,7
+171,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 ) {
*/
protected function context( $lines ) {
foreach ( $lines as $line ) {
@@
-159,8
+184,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__ );
*/
protected function changed( $orig, $closing ) {
wfProfileIn( __METHOD__ );
@@
-183,4
+210,5
@@
class TableDiffFormatter extends DiffFormatter {
}
wfProfileOut( __METHOD__ );
}
}
wfProfileOut( __METHOD__ );
}
+
}
}