From 33cb9e803ae020917bcc073e1599d2fdfbfb04c2 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Tue, 26 Apr 2016 16:41:47 -0700 Subject: [PATCH] Improve diff docs Change-Id: I42332051f6f1b94f459b06d6c69625bc2a1fa9cf --- includes/diff/DiffEngine.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/includes/diff/DiffEngine.php b/includes/diff/DiffEngine.php index 75e8791d5b..1853b865a6 100644 --- a/includes/diff/DiffEngine.php +++ b/includes/diff/DiffEngine.php @@ -67,6 +67,8 @@ class DiffEngine { } /** + * Performs diff + * * @param string[] $from_lines * @param string[] $to_lines * @@ -138,8 +140,12 @@ class DiffEngine { * to be the "change". * * This is extracted verbatim from analyze.c (GNU diffutils-2.7). + * + * @param string[] $lines + * @param string[] $changed + * @param string[] $other_changed */ - private function shiftBoundaries( $lines, &$changed, $other_changed ) { + private function shiftBoundaries( array $lines, array &$changed, array $other_changed ) { $i = 0; $j = 0; @@ -256,7 +262,11 @@ class DiffEngine { } } - protected function diffInternal( /*array*/ $from, /*array*/ $to ) { + /** + * @param string[] $from + * @param string[] $to + */ + protected function diffInternal( array $from, array $to ) { // remember initial lengths $m = count( $from ); $n = count( $to ); -- 2.20.1