Siebrand has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/96563


Change subject: Rename classes DiffOp_* to DiffOp*
......................................................................

Rename classes DiffOp_* to DiffOp*

Part of program to remove underscores from class names. Checked core and
600+ extensions for occurrences. All uses are in core in core are updated
in this patch. No uses in extensions.

Change-Id: I86b8c6f8702e661554c7b794df09892db94a84d1
---
M includes/AutoLoader.php
M includes/diff/DairikiDiff.php
M includes/diff/DiffFormatter.php
3 files changed, 22 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/63/96563/1

diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php
index 9a349f0..1770e04 100644
--- a/includes/AutoLoader.php
+++ b/includes/AutoLoader.php
@@ -505,10 +505,10 @@
        # includes/diff
        'DiffEngine' => 'includes/diff/DairikiDiff.php',
        'DiffOp' => 'includes/diff/DairikiDiff.php',
-       'DiffOp_Add' => 'includes/diff/DairikiDiff.php',
-       'DiffOp_Change' => 'includes/diff/DairikiDiff.php',
-       'DiffOp_Copy' => 'includes/diff/DairikiDiff.php',
-       'DiffOp_Delete' => 'includes/diff/DairikiDiff.php',
+       'DiffOpAdd' => 'includes/diff/DairikiDiff.php',
+       'DiffOpChange' => 'includes/diff/DairikiDiff.php',
+       'DiffOpCopy' => 'includes/diff/DairikiDiff.php',
+       'DiffOpDelete' => 'includes/diff/DairikiDiff.php',
        'HWLDFWordAccumulator' => 'includes/diff/DairikiDiff.php',
        'ArrayDiffFormatter' => 'includes/diff/ArrayDiffFormatter.php',
        'Diff' => 'includes/diff/DairikiDiff.php',
diff --git a/includes/diff/DairikiDiff.php b/includes/diff/DairikiDiff.php
index 2271261..cc2b4c5 100644
--- a/includes/diff/DairikiDiff.php
+++ b/includes/diff/DairikiDiff.php
@@ -57,7 +57,7 @@
  * @private
  * @ingroup DifferenceEngine
  */
-class DiffOp_Copy extends DiffOp {
+class DiffOpCopy extends DiffOp {
        public $type = 'copy';
 
        function __construct( $orig, $closing = false ) {
@@ -69,10 +69,10 @@
        }
 
        /**
-        * @return DiffOp_Copy
+        * @return DiffOpCopy
         */
        function reverse() {
-               return new DiffOp_Copy( $this->closing, $this->orig );
+               return new DiffOpCopy( $this->closing, $this->orig );
        }
 }
 
@@ -81,7 +81,7 @@
  * @private
  * @ingroup DifferenceEngine
  */
-class DiffOp_Delete extends DiffOp {
+class DiffOpDelete extends DiffOp {
        public $type = 'delete';
 
        function __construct( $lines ) {
@@ -90,10 +90,10 @@
        }
 
        /**
-        * @return DiffOp_Add
+        * @return DiffOpAdd
         */
        function reverse() {
-               return new DiffOp_Add( $this->orig );
+               return new DiffOpAdd( $this->orig );
        }
 }
 
@@ -102,7 +102,7 @@
  * @private
  * @ingroup DifferenceEngine
  */
-class DiffOp_Add extends DiffOp {
+class DiffOpAdd extends DiffOp {
        public $type = 'add';
 
        function __construct( $lines ) {
@@ -111,10 +111,10 @@
        }
 
        /**
-        * @return DiffOp_Delete
+        * @return DiffOpDelete
         */
        function reverse() {
-               return new DiffOp_Delete( $this->closing );
+               return new DiffOpDelete( $this->closing );
        }
 }
 
@@ -123,7 +123,7 @@
  * @private
  * @ingroup DifferenceEngine
  */
-class DiffOp_Change extends DiffOp {
+class DiffOpChange extends DiffOp {
        public $type = 'change';
 
        function __construct( $orig, $closing ) {
@@ -132,10 +132,10 @@
        }
 
        /**
-        * @return DiffOp_Change
+        * @return DiffOpChange
         */
        function reverse() {
-               return new DiffOp_Change( $this->closing, $this->orig );
+               return new DiffOpChange( $this->closing, $this->orig );
        }
 }
 
@@ -209,7 +209,7 @@
                                ++$yi;
                        }
                        if ( $copy ) {
-                               $edits[] = new DiffOp_Copy( $copy );
+                               $edits[] = new DiffOpCopy( $copy );
                        }
 
                        // Find deletes & adds.
@@ -224,11 +224,11 @@
                        }
 
                        if ( $delete && $add ) {
-                               $edits[] = new DiffOp_Change( $delete, $add );
+                               $edits[] = new DiffOpChange( $delete, $add );
                        } elseif ( $delete ) {
-                               $edits[] = new DiffOp_Delete( $delete );
+                               $edits[] = new DiffOpDelete( $delete );
                        } elseif ( $add ) {
-                               $edits[] = new DiffOp_Add( $add );
+                               $edits[] = new DiffOpAdd( $add );
                        }
                }
                wfProfileOut( __METHOD__ );
diff --git a/includes/diff/DiffFormatter.php b/includes/diff/DiffFormatter.php
index 428e97d..7f253d2 100644
--- a/includes/diff/DiffFormatter.php
+++ b/includes/diff/DiffFormatter.php
@@ -74,7 +74,7 @@
                                        } else {
                                                if ( $ntrail ) {
                                                        $context = array_slice( 
$edit->orig, 0, $ntrail );
-                                                       $block[] = new 
DiffOp_Copy( $context );
+                                                       $block[] = new 
DiffOpCopy( $context );
                                                }
                                                $this->block( $x0, $ntrail + 
$xi - $x0,
                                                        $y0, $ntrail + $yi - 
$y0,
@@ -90,7 +90,7 @@
                                        $y0 = $yi - count( $context );
                                        $block = array();
                                        if ( $context ) {
-                                               $block[] = new DiffOp_Copy( 
$context );
+                                               $block[] = new DiffOpCopy( 
$context );
                                        }
                                }
                                $block[] = $edit;

-- 
To view, visit https://gerrit.wikimedia.org/r/96563
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I86b8c6f8702e661554c7b794df09892db94a84d1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to