Rename classes DiffOp_* to DiffOp*
authorSiebrand Mazeland <s.mazeland@xs4all.nl>
Wed, 20 Nov 2013 19:28:14 +0000 (20:28 +0100)
committerSiebrand Mazeland <s.mazeland@xs4all.nl>
Wed, 20 Nov 2013 19:28:14 +0000 (20:28 +0100)
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

includes/AutoLoader.php
includes/diff/DairikiDiff.php
includes/diff/DiffFormatter.php

index 9a349f0..1770e04 100644 (file)
@@ -505,10 +505,10 @@ $wgAutoloadLocalClasses = array(
        # 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',
index 2271261..cc2b4c5 100644 (file)
@@ -57,7 +57,7 @@ abstract class DiffOp {
  * @private
  * @ingroup DifferenceEngine
  */
-class DiffOp_Copy extends DiffOp {
+class DiffOpCopy extends DiffOp {
        public $type = 'copy';
 
        function __construct( $orig, $closing = false ) {
@@ -69,10 +69,10 @@ class DiffOp_Copy extends DiffOp {
        }
 
        /**
-        * @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 @@ class DiffOp_Copy extends DiffOp {
  * @private
  * @ingroup DifferenceEngine
  */
-class DiffOp_Delete extends DiffOp {
+class DiffOpDelete extends DiffOp {
        public $type = 'delete';
 
        function __construct( $lines ) {
@@ -90,10 +90,10 @@ class DiffOp_Delete extends DiffOp {
        }
 
        /**
-        * @return DiffOp_Add
+        * @return DiffOpAdd
         */
        function reverse() {
-               return new DiffOp_Add( $this->orig );
+               return new DiffOpAdd( $this->orig );
        }
 }
 
@@ -102,7 +102,7 @@ class DiffOp_Delete extends DiffOp {
  * @private
  * @ingroup DifferenceEngine
  */
-class DiffOp_Add extends DiffOp {
+class DiffOpAdd extends DiffOp {
        public $type = 'add';
 
        function __construct( $lines ) {
@@ -111,10 +111,10 @@ class DiffOp_Add extends DiffOp {
        }
 
        /**
-        * @return DiffOp_Delete
+        * @return DiffOpDelete
         */
        function reverse() {
-               return new DiffOp_Delete( $this->closing );
+               return new DiffOpDelete( $this->closing );
        }
 }
 
@@ -123,7 +123,7 @@ class DiffOp_Add extends DiffOp {
  * @private
  * @ingroup DifferenceEngine
  */
-class DiffOp_Change extends DiffOp {
+class DiffOpChange extends DiffOp {
        public $type = 'change';
 
        function __construct( $orig, $closing ) {
@@ -132,10 +132,10 @@ class DiffOp_Change extends DiffOp {
        }
 
        /**
-        * @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 @@ class DiffEngine {
                                ++$yi;
                        }
                        if ( $copy ) {
-                               $edits[] = new DiffOp_Copy( $copy );
+                               $edits[] = new DiffOpCopy( $copy );
                        }
 
                        // Find deletes & adds.
@@ -224,11 +224,11 @@ class DiffEngine {
                        }
 
                        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__ );
index 428e97d..7f253d2 100644 (file)
@@ -74,7 +74,7 @@ abstract class DiffFormatter {
                                        } 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 @@ abstract class DiffFormatter {
                                        $y0 = $yi - count( $context );
                                        $block = array();
                                        if ( $context ) {
-                                               $block[] = new DiffOp_Copy( $context );
+                                               $block[] = new DiffOpCopy( $context );
                                        }
                                }
                                $block[] = $edit;