aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc/DifferenceEngine.php
diff options
context:
space:
mode:
authorTakamura <plehanov.v@gmail.com>2017-03-31 12:58:14 +1000
committerAndreas Gohr <andi@splitbrain.org>2017-03-31 09:33:33 +0200
commitf50a239b3b819527445d240746b09a05fb76d103 (patch)
tree7a7094ce2741cca0e6ff47d68e2c69c8543aed5d /inc/DifferenceEngine.php
parent3476bb81a3484baad8418870e1351c292b82291f (diff)
downloaddokuwiki-f50a239b3b819527445d240746b09a05fb76d103.tar.gz
dokuwiki-f50a239b3b819527445d240746b09a05fb76d103.zip
I supplemented the existing comments on the methods in which there was not enough information to the standard phpDoc.
Diffstat (limited to 'inc/DifferenceEngine.php')
-rw-r--r--inc/DifferenceEngine.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php
index de91a54f8..37b55e10d 100644
--- a/inc/DifferenceEngine.php
+++ b/inc/DifferenceEngine.php
@@ -226,6 +226,14 @@ class _DiffEngine {
* of the two files do not match, and likewise that the last lines do not
* match. The caller must trim matching lines from the beginning and end
* of the portions it is going to specify.
+ *
+ * @param integer $xoff
+ * @param integer $xlim
+ * @param integer $yoff
+ * @param integer $ylim
+ * @param integer $nchunks
+ *
+ * @return array
*/
function _diag($xoff, $xlim, $yoff, $ylim, $nchunks) {
$flip = false;
@@ -336,6 +344,11 @@ class _DiffEngine {
*
* Note that XLIM, YLIM are exclusive bounds.
* All line numbers are origin-0 and discarded lines are not counted.
+ *
+ * @param integer $xoff
+ * @param integer $xlim
+ * @param integer $yoff
+ * @param integer $ylim
*/
function _compareseq($xoff, $xlim, $yoff, $ylim) {
// Slide down the bottom initial diagonal.
@@ -392,6 +405,10 @@ class _DiffEngine {
* to be the "change".
*
* This is extracted verbatim from analyze.c (GNU diffutils-2.7).
+ *
+ * @param array $lines
+ * @param array $changed
+ * @param array $other_changed
*/
function _shift_boundaries($lines, &$changed, $other_changed) {
$i = 0;
@@ -612,6 +629,9 @@ class Diff {
* Check a Diff for validity.
*
* This is here only for debugging purposes.
+ *
+ * @param mixed $from_lines
+ * @param mixed $to_lines
*/
function _check($from_lines, $to_lines) {
if (serialize($from_lines) != serialize($this->orig()))
@@ -889,6 +909,10 @@ class HTMLDiff {
/**
* Return a class or style parameter
+ *
+ * @param string $classname
+ *
+ * @return string
*/
static function css($classname){
global $DIFF_INLINESTYLES;
@@ -1339,6 +1363,11 @@ class Diff3 extends Diff {
/**
* @access private
+ *
+ * @param array $edits1
+ * @param array $edits2
+ *
+ * @return array
*/
function _diff3($edits1, $edits2) {
$edits = array();