Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 4 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| DiffOpDelete | |
0.00% |
0 / 3 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| reverse | |
0.00% |
0 / 1 |
|
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 | |
| 14 | namespace Wikimedia\Diff; |
| 15 | |
| 16 | /** |
| 17 | * Extends DiffOp. Used to mark strings that have been |
| 18 | * deleted from the first string array. |
| 19 | * |
| 20 | * @ingroup DifferenceEngine |
| 21 | */ |
| 22 | class DiffOpDelete extends DiffOp { |
| 23 | /** @inheritDoc */ |
| 24 | public $type = 'delete'; |
| 25 | |
| 26 | /** |
| 27 | * @param string[] $lines |
| 28 | */ |
| 29 | public function __construct( $lines ) { |
| 30 | $this->orig = $lines; |
| 31 | $this->closing = false; |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * @return DiffOpAdd |
| 36 | */ |
| 37 | public function reverse() { |
| 38 | return new DiffOpAdd( $this->orig ); |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | /** @deprecated class alias since 1.41 */ |
| 43 | class_alias( DiffOpDelete::class, 'DiffOpDelete' ); |