Improve diff docs
authorMax Semenik <maxsem.wiki@gmail.com>
Tue, 26 Apr 2016 23:41:47 +0000 (16:41 -0700)
committerMaxSem <maxsem.wiki@gmail.com>
Wed, 18 May 2016 01:59:29 +0000 (01:59 +0000)
Change-Id: I42332051f6f1b94f459b06d6c69625bc2a1fa9cf

includes/diff/DiffEngine.php

index 75e8791..1853b86 100644 (file)
@@ -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 );