MediaWiki master
DiffOpChange.php
Go to the documentation of this file.
1<?php
2
14namespace Wikimedia\Diff;
15
22class DiffOpChange extends DiffOp {
24 public $type = 'change';
25
30 public function __construct( $orig, $closing ) {
31 $this->orig = $orig;
32 $this->closing = $closing;
33 }
34
38 public function reverse() {
39 return new DiffOpChange( $this->closing, $this->orig );
40 }
41}
42
44class_alias( DiffOpChange::class, 'DiffOpChange' );
__construct( $orig, $closing)
The base class for all other DiffOp classes.
Definition DiffOp.php:24
string[] false $closing
The right ("new") side of the diff, or false when it's a "delete".
Definition DiffOp.php:42
string[] false $orig
The left ("old") side of the diff, or false when it's an "add".
Definition DiffOp.php:36