@@ 132-146 (lines=15) @@ | ||
129 | * @private |
|
130 | * @ingroup DifferenceEngine |
|
131 | */ |
|
132 | class DiffOpDelete extends DiffOp { |
|
133 | public $type = 'delete'; |
|
134 | ||
135 | public function __construct( $lines ) { |
|
136 | $this->orig = $lines; |
|
137 | $this->closing = false; |
|
138 | } |
|
139 | ||
140 | /** |
|
141 | * @return DiffOpAdd |
|
142 | */ |
|
143 | public function reverse() { |
|
144 | return new DiffOpAdd( $this->orig ); |
|
145 | } |
|
146 | } |
|
147 | ||
148 | /** |
|
149 | * Extends DiffOp. Used to mark strings that have been |
|
@@ 155-169 (lines=15) @@ | ||
152 | * @private |
|
153 | * @ingroup DifferenceEngine |
|
154 | */ |
|
155 | class DiffOpAdd extends DiffOp { |
|
156 | public $type = 'add'; |
|
157 | ||
158 | public function __construct( $lines ) { |
|
159 | $this->closing = $lines; |
|
160 | $this->orig = false; |
|
161 | } |
|
162 | ||
163 | /** |
|
164 | * @return DiffOpDelete |
|
165 | */ |
|
166 | public function reverse() { |
|
167 | return new DiffOpDelete( $this->closing ); |
|
168 | } |
|
169 | } |
|
170 | ||
171 | /** |
|
172 | * Extends DiffOp. Used to mark strings that have been |