Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
DiffOpChange
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 reverse
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3/**
4 * A PHP diff engine for phpwiki. (Taken from phpwiki-1.3.3)
5 *
6 * Copyright © 2000, 2001 Geoffrey T. Dairiki <dairiki@dairiki.org>
7 * You may copy this code freely under the conditions of the GPL.
8 *
9 * @license GPL-2.0-or-later
10 * @file
11 * @ingroup DifferenceEngine
12 */
13
14namespace Wikimedia\Diff;
15
16/**
17 * Extends DiffOp. Used to mark strings that have been
18 * changed from the first string array (both added and subtracted).
19 *
20 * @ingroup DifferenceEngine
21 */
22class DiffOpChange extends DiffOp {
23    /** @inheritDoc */
24    public $type = 'change';
25
26    /**
27     * @param string[] $orig
28     * @param string[] $closing
29     */
30    public function __construct( $orig, $closing ) {
31        $this->orig = $orig;
32        $this->closing = $closing;
33    }
34
35    /**
36     * @return DiffOpChange
37     */
38    public function reverse() {
39        return new DiffOpChange( $this->closing, $this->orig );
40    }
41}
42
43/** @deprecated class alias since 1.41 */
44class_alias( DiffOpChange::class, 'DiffOpChange' );