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 "Rephrase 'logeventslist-more-filters'"
[lhc/web/wiklou.git]
/
includes
/
diff
/
UnifiedDiffFormatter.php
diff --git
a/includes/diff/UnifiedDiffFormatter.php
b/includes/diff/UnifiedDiffFormatter.php
index
0a86ccc
..
72f1a66
100644
(file)
--- a/
includes/diff/UnifiedDiffFormatter.php
+++ b/
includes/diff/UnifiedDiffFormatter.php
@@
-29,6
+29,7
@@
* @ingroup DifferenceEngine
*/
class UnifiedDiffFormatter extends DiffFormatter {
* @ingroup DifferenceEngine
*/
class UnifiedDiffFormatter extends DiffFormatter {
+
/** @var int */
protected $leadingContextLines = 2;
/** @var int */
protected $leadingContextLines = 2;
@@
-36,22
+37,32
@@
class UnifiedDiffFormatter extends DiffFormatter {
protected $trailingContextLines = 2;
/**
protected $trailingContextLines = 2;
/**
- * @param $lines
+ * @param string[] $lines
+ * @param string $prefix
+ */
+ protected function lines( $lines, $prefix = ' ' ) {
+ foreach ( $lines as $line ) {
+ $this->writeOutput( "{$prefix}{$line}\n" );
+ }
+ }
+
+ /**
+ * @param string[] $lines
*/
protected function added( $lines ) {
$this->lines( $lines, '+' );
}
/**
*/
protected function added( $lines ) {
$this->lines( $lines, '+' );
}
/**
- * @param $lines
+ * @param
string[]
$lines
*/
protected function deleted( $lines ) {
$this->lines( $lines, '-' );
}
/**
*/
protected function deleted( $lines ) {
$this->lines( $lines, '-' );
}
/**
- * @param $orig
- * @param $closing
+ * @param
string[]
$orig
+ * @param
string[]
$closing
*/
protected function changed( $orig, $closing ) {
$this->deleted( $orig );
*/
protected function changed( $orig, $closing ) {
$this->deleted( $orig );
@@
-59,13
+70,15
@@
class UnifiedDiffFormatter 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 "@@ -$xbeg,$xlen +$ybeg,$ylen @@";
}
* @return string
*/
protected function blockHeader( $xbeg, $xlen, $ybeg, $ylen ) {
return "@@ -$xbeg,$xlen +$ybeg,$ylen @@";
}
+
}
}