MediaWiki master
DiffOpChange.php
Go to the documentation of this file.
1<?php
2
28namespace Wikimedia\Diff;
29
36class DiffOpChange extends DiffOp {
38 public $type = 'change';
39
44 public function __construct( $orig, $closing ) {
45 $this->orig = $orig;
46 $this->closing = $closing;
47 }
48
52 public function reverse() {
53 return new DiffOpChange( $this->closing, $this->orig );
54 }
55}
56
58class_alias( DiffOpChange::class, 'DiffOpChange' );
__construct( $orig, $closing)
The base class for all other DiffOp classes.
Definition DiffOp.php:38
string[] false $closing
The right ("new") side of the diff, or false when it's a "delete".
Definition DiffOp.php:56
string[] false $orig
The left ("old") side of the diff, or false when it's an "add".
Definition DiffOp.php:50