diff --git a/include/DifferenceEngine/DifferenceEngine.php b/include/DifferenceEngine/DifferenceEngine.php index 126e74be9..2fb1fa08c 100644 --- a/include/DifferenceEngine/DifferenceEngine.php +++ b/include/DifferenceEngine/DifferenceEngine.php @@ -42,7 +42,7 @@ class _DiffOp { class _DiffOp_Copy extends _DiffOp { var $type = 'copy'; - function _DiffOp_Copy ($orig, $closing = false) { + function __construct($orig, $closing = false) { if (!is_array($closing)) $closing = $orig; $this->orig = $orig; @@ -62,7 +62,7 @@ class _DiffOp_Copy extends _DiffOp { class _DiffOp_Delete extends _DiffOp { var $type = 'delete'; - function _DiffOp_Delete ($lines) { + function __construct($lines) { $this->orig = $lines; $this->closing = false; } @@ -80,7 +80,7 @@ class _DiffOp_Delete extends _DiffOp { class _DiffOp_Add extends _DiffOp { var $type = 'add'; - function _DiffOp_Add ($lines) { + function __construct($lines) { $this->closing = $lines; $this->orig = false; } @@ -98,7 +98,7 @@ class _DiffOp_Add extends _DiffOp { class _DiffOp_Change extends _DiffOp { var $type = 'change'; - function _DiffOp_Change ($orig, $closing) { + function __construct($orig, $closing) { $this->orig = $orig; $this->closing = $closing; } @@ -569,7 +569,7 @@ class Diff * (Typically these are lines from a file.) * @param $to_lines array An array of strings. */ - function Diff($from_lines, $to_lines) { + function __construct($from_lines, $to_lines) { $eng = new _DiffEngine; $this->edits = $eng->diff($from_lines, $to_lines); //$this->_check($from_lines, $to_lines); @@ -721,7 +721,7 @@ class MappedDiff extends Diff * @param $mapped_to_lines array This array should * have the same number of elements as $to_lines. */ - function MappedDiff($from_lines, $to_lines, + function __construct($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) { //wfProfileIn( __METHOD__ ); @@ -993,7 +993,7 @@ define('NBSP', ' '); // iso-8859-x non-breaking space. * @ingroup DifferenceEngine */ class _HWLDF_WordAccumulator { - function _HWLDF_WordAccumulator () { + function __construct () { $this->_lines = array(); $this->_line = ''; $this->_group = ''; @@ -1056,7 +1056,7 @@ class _HWLDF_WordAccumulator { class WordLevelDiff extends MappedDiff { const MAX_LINE_LENGTH = 10000; - function WordLevelDiff ($orig_lines, $closing_lines) { + function __construct ($orig_lines, $closing_lines) { //wfProfileIn( __METHOD__ ); list ($orig_words, $orig_stripped) = $this->_split($orig_lines); @@ -1137,7 +1137,7 @@ class WordLevelDiff extends MappedDiff { * @ingroup DifferenceEngine */ class TableDiffFormatter extends DiffFormatter { - function TableDiffFormatter() { + function __construct() { $this->leading_context_lines = 2; $this->trailing_context_lines = 2; }