Skip to content

Commit

Permalink
Add undeclared Class Properties
Browse files Browse the repository at this point in the history
Fixes Creation of dynamic property _HWLDF_WordAccumulator::$_lines /
$_line / $_group / $_tag is deprecated in ./inc/DifferenceEngine.php
on line 936

And proactively caught another bunch in _Diff3_Op class (not reported
in unit tests)
  • Loading branch information
dregad committed Apr 6, 2023
1 parent 3d52dbf commit ebba5e5
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions inc/DifferenceEngine.php
Expand Up @@ -929,6 +929,18 @@ static function css($classname){

class _HWLDF_WordAccumulator {

/** @var array */
protected $_lines;

/** @var string */
protected $_line;

/** @var string */
protected $_group;

/** @var string */
protected $_tag;

function __construct() {
$this->_lines = array();
$this->_line = '';
Expand Down Expand Up @@ -1439,6 +1451,18 @@ function _diff3($edits1, $edits2) {
*/
class _Diff3_Op {

/** @var array|mixed */
protected $orig;

/** @var array|mixed */
protected $final1;

/** @var array|mixed */
protected $final2;

/** @var array|mixed|false */
protected $_merged;

function __construct($orig = false, $final1 = false, $final2 = false) {
$this->orig = $orig ? $orig : array();
$this->final1 = $final1 ? $final1 : array();
Expand Down

0 comments on commit ebba5e5

Please sign in to comment.