WordPress.org

Make WordPress Core

Ticket #16768: text_diff.16768.2.patch

File text_diff.16768.2.patch, 3.0 KB (added by ampt, 7 years ago)
  • wp-includes/wp-diff.php

     
    6969         * @param array $params
    7070         */
    7171        function __construct( $params = array() ) {
    72                 $parent = get_parent_class($this);
    73                 $this->$parent( $params );
     72                parent::__construct( $params );
    7473        }
    7574
    7675        /**
  • wp-includes/Text/Diff/Renderer.php

     
    3333    /**
    3434     * Constructor.
    3535     */
    36     function Text_Diff_Renderer($params = array())
     36    function __construct($params = array())
    3737    {
    3838        foreach ($params as $param => $value) {
    3939            $v = '_' . $param;
  • wp-includes/Text/Diff.php

     
    3333     *                           Normally an array of two arrays, each
    3434     *                           containing the lines from a file.
    3535     */
    36     function Text_Diff($engine, $params)
     36    function __construct($engine, $params)
    3737    {
    3838        // Backward compatibility workaround.
    3939        if (!is_string($engine)) {
     
    304304     * @param array $mapped_to_lines    This array should have the same number
    305305     *                                  of elements as $to_lines.
    306306     */
    307     function Text_MappedDiff($from_lines, $to_lines,
     307    function __construct($from_lines, $to_lines,
    308308                             $mapped_from_lines, $mapped_to_lines)
    309309    {
    310310        assert(count($from_lines) == count($mapped_from_lines));
    311311        assert(count($to_lines) == count($mapped_to_lines));
    312312
    313         parent::Text_Diff($mapped_from_lines, $mapped_to_lines);
     313        parent::__construct($mapped_from_lines, $mapped_to_lines);
    314314
    315315        $xi = $yi = 0;
    316316        for ($i = 0; $i < count($this->_edits); $i++) {
     
    366366 */
    367367class Text_Diff_Op_copy extends Text_Diff_Op {
    368368
    369     function Text_Diff_Op_copy($orig, $final = false)
     369    function __construct($orig, $final = false)
    370370    {
    371371        if (!is_array($final)) {
    372372            $final = $orig;
     
    391391 */
    392392class Text_Diff_Op_delete extends Text_Diff_Op {
    393393
    394     function Text_Diff_Op_delete($lines)
     394    function __construct($lines)
    395395    {
    396396        $this->orig = $lines;
    397397        $this->final = false;
     
    413413 */
    414414class Text_Diff_Op_add extends Text_Diff_Op {
    415415
    416     function Text_Diff_Op_add($lines)
     416    function __construct($lines)
    417417    {
    418418        $this->final = $lines;
    419419        $this->orig = false;
     
    435435 */
    436436class Text_Diff_Op_change extends Text_Diff_Op {
    437437
    438     function Text_Diff_Op_change($orig, $final)
     438    function __construct($orig, $final)
    439439    {
    440440        $this->orig = $orig;
    441441        $this->final = $final;