jenkins-bot has submitted this change and it was merged.

Change subject: Rename Convert*a*bleTimestamp to Convert*i*bleTimestamp
......................................................................


Rename Convert*a*bleTimestamp to Convert*i*bleTimestamp

Per the dictionary.

Change-Id: I3dcef9fb020c8c6764ee073111ed8c032e4c5a63
---
M autoload.php
M includes/MWTimestamp.php
M includes/libs/rdbms/database/Database.php
M includes/libs/rdbms/database/DatabasePostgres.php
R includes/libs/time/ConvertibleTimestamp.php
M includes/libs/xmp/XMPValidate.php
R tests/phpunit/includes/libs/time/ConvertibleTimestampTest.php
7 files changed, 32 insertions(+), 32 deletions(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/autoload.php b/autoload.php
index efd34ea..433f907 100644
--- a/autoload.php
+++ b/autoload.php
@@ -281,8 +281,8 @@
        'ConvertExtensionToRegistration' => __DIR__ . 
'/maintenance/convertExtensionToRegistration.php',
        'ConvertLinks' => __DIR__ . '/maintenance/convertLinks.php',
        'ConvertUserOptions' => __DIR__ . '/maintenance/convertUserOptions.php',
-       'ConvertableTimestamp' => __DIR__ . 
'/includes/libs/time/ConvertableTimestamp.php',
        'ConverterRule' => __DIR__ . '/languages/ConverterRule.php',
+       'ConvertibleTimestamp' => __DIR__ . 
'/includes/libs/time/ConvertibleTimestamp.php',
        'Cookie' => __DIR__ . '/includes/libs/Cookie.php',
        'CookieJar' => __DIR__ . '/includes/libs/CookieJar.php',
        'CopyFileBackend' => __DIR__ . '/maintenance/copyFileBackend.php',
diff --git a/includes/MWTimestamp.php b/includes/MWTimestamp.php
index 201e9b6..c1e5cc4 100644
--- a/includes/MWTimestamp.php
+++ b/includes/MWTimestamp.php
@@ -28,7 +28,7 @@
  *
  * @since 1.20
  */
-class MWTimestamp extends ConvertableTimestamp {
+class MWTimestamp extends ConvertibleTimestamp {
        /**
         * Get a timestamp instance in GMT
         *
diff --git a/includes/libs/rdbms/database/Database.php 
b/includes/libs/rdbms/database/Database.php
index 04ce8ab..d3c9d57 100644
--- a/includes/libs/rdbms/database/Database.php
+++ b/includes/libs/rdbms/database/Database.php
@@ -2972,7 +2972,7 @@
        }
 
        public function timestamp( $ts = 0 ) {
-               $t = new ConvertableTimestamp( $ts );
+               $t = new ConvertibleTimestamp( $ts );
                // Let errors bubble up to avoid putting garbage in the DB
                return $t->getTimestamp( TS_MW );
        }
@@ -3459,7 +3459,7 @@
                }
 
                try {
-                       $t = new ConvertableTimestamp( $expiry );
+                       $t = new ConvertibleTimestamp( $expiry );
 
                        return $t->getTimestamp( $format );
                } catch ( TimestampException $e ) {
diff --git a/includes/libs/rdbms/database/DatabasePostgres.php 
b/includes/libs/rdbms/database/DatabasePostgres.php
index 69488af..8c73a15 100644
--- a/includes/libs/rdbms/database/DatabasePostgres.php
+++ b/includes/libs/rdbms/database/DatabasePostgres.php
@@ -860,7 +860,7 @@
        }
 
        function timestamp( $ts = 0 ) {
-               $ct = new ConvertableTimestamp( $ts );
+               $ct = new ConvertibleTimestamp( $ts );
 
                return $ct->getTimestamp( TS_POSTGRES );
        }
diff --git a/includes/libs/time/ConvertableTimestamp.php 
b/includes/libs/time/ConvertibleTimestamp.php
similarity index 97%
rename from includes/libs/time/ConvertableTimestamp.php
rename to includes/libs/time/ConvertibleTimestamp.php
index a784dc6..7cada84 100644
--- a/includes/libs/time/ConvertableTimestamp.php
+++ b/includes/libs/time/ConvertibleTimestamp.php
@@ -28,7 +28,7 @@
  *
  * @since 1.28
  */
-class ConvertableTimestamp {
+class ConvertibleTimestamp {
        /**
         * Standard gmdate() formats for the different timestamp types.
         */
@@ -226,11 +226,11 @@
        /**
         * Calculate the difference between two ConvertableTimestamp objects.
         *
-        * @param ConvertableTimestamp $relativeTo Base time to calculate 
difference from
+        * @param ConvertibleTimestamp $relativeTo Base time to calculate 
difference from
         * @return DateInterval|bool The DateInterval object representing the
         *   difference between the two dates or false on failure
         */
-       public function diff( ConvertableTimestamp $relativeTo ) {
+       public function diff( ConvertibleTimestamp $relativeTo ) {
                return $this->timestamp->diff( $relativeTo->timestamp );
        }
 
diff --git a/includes/libs/xmp/XMPValidate.php 
b/includes/libs/xmp/XMPValidate.php
index 32a3340..aaf6491 100644
--- a/includes/libs/xmp/XMPValidate.php
+++ b/includes/libs/xmp/XMPValidate.php
@@ -329,7 +329,7 @@
                        // We know that if we got to this step, year, month day 
hour and min must be set
                        // by virtue of regex not failing.
 
-                       $unix = ( new ConvertableTimestamp(
+                       $unix = ( new ConvertibleTimestamp(
                                $res[1] . $res[2] . $res[3] . $res[4] . $res[5] 
. $res[6]
                        ) )->getTimestamp( TS_UNIX );
                        $offset = intval( substr( $res[7], 1, 2 ) ) * 60 * 60;
@@ -337,7 +337,7 @@
                        if ( substr( $res[7], 0, 1 ) === '-' ) {
                                $offset = -$offset;
                        }
-                       $val = ( new ConvertableTimestamp( $unix + $offset ) 
)->getTimestamp( TS_EXIF );
+                       $val = ( new ConvertibleTimestamp( $unix + $offset ) 
)->getTimestamp( TS_EXIF );
 
                        if ( $stripSeconds ) {
                                // If seconds weren't specified, remove the 
trailing ':00'.
diff --git a/tests/phpunit/includes/libs/time/ConvertableTimestampTest.php 
b/tests/phpunit/includes/libs/time/ConvertibleTimestampTest.php
similarity index 75%
rename from tests/phpunit/includes/libs/time/ConvertableTimestampTest.php
rename to tests/phpunit/includes/libs/time/ConvertibleTimestampTest.php
index 986dda4..d48caf3 100644
--- a/tests/phpunit/includes/libs/time/ConvertableTimestampTest.php
+++ b/tests/phpunit/includes/libs/time/ConvertibleTimestampTest.php
@@ -3,22 +3,22 @@
 /**
  * Tests timestamp parsing and output.
  */
-class ConvertableTimestampTest extends PHPUnit_Framework_TestCase {
+class ConvertibleTimestampTest extends PHPUnit_Framework_TestCase {
        /**
-        * @covers ConvertableTimestamp::__construct
+        * @covers ConvertibleTimestamp::__construct
         */
        public function testConstructWithNoTimestamp() {
-               $timestamp = new ConvertableTimestamp();
+               $timestamp = new ConvertibleTimestamp();
                $this->assertInternalType( 'string', $timestamp->getTimestamp() 
);
                $this->assertNotEmpty( $timestamp->getTimestamp() );
                $this->assertNotEquals( false, strtotime( 
$timestamp->getTimestamp( TS_MW ) ) );
        }
 
        /**
-        * @covers ConvertableTimestamp::__toString
+        * @covers ConvertibleTimestamp::__toString
         */
        public function testToString() {
-               $timestamp = new ConvertableTimestamp( '1406833268' ); // 
Equivalent to 20140731190108
+               $timestamp = new ConvertibleTimestamp( '1406833268' ); // 
Equivalent to 20140731190108
                $this->assertEquals( '1406833268', $timestamp->__toString() );
        }
 
@@ -33,11 +33,11 @@
 
        /**
         * @dataProvider provideValidTimestampDifferences
-        * @covers ConvertableTimestamp::diff
+        * @covers ConvertibleTimestamp::diff
         */
        public function testDiff( $timestamp1, $timestamp2, $expected ) {
-               $timestamp1 = new ConvertableTimestamp( $timestamp1 );
-               $timestamp2 = new ConvertableTimestamp( $timestamp2 );
+               $timestamp1 = new ConvertibleTimestamp( $timestamp1 );
+               $timestamp2 = new ConvertibleTimestamp( $timestamp2 );
                $diff = $timestamp1->diff( $timestamp2 );
                $this->assertEquals( $expected, $diff->format( '%D %H %I %S' ) 
);
        }
@@ -45,66 +45,66 @@
        /**
         * Test parsing of valid timestamps and outputing to MW format.
         * @dataProvider provideValidTimestamps
-        * @covers ConvertableTimestamp::getTimestamp
+        * @covers ConvertibleTimestamp::getTimestamp
         */
        public function testValidParse( $format, $original, $expected ) {
-               $timestamp = new ConvertableTimestamp( $original );
+               $timestamp = new ConvertibleTimestamp( $original );
                $this->assertEquals( $expected, $timestamp->getTimestamp( TS_MW 
) );
        }
 
        /**
         * Test outputting valid timestamps to different formats.
         * @dataProvider provideValidTimestamps
-        * @covers ConvertableTimestamp::getTimestamp
+        * @covers ConvertibleTimestamp::getTimestamp
         */
        public function testValidOutput( $format, $expected, $original ) {
-               $timestamp = new ConvertableTimestamp( $original );
+               $timestamp = new ConvertibleTimestamp( $original );
                $this->assertEquals( $expected, 
(string)$timestamp->getTimestamp( $format ) );
        }
 
        /**
         * Test an invalid timestamp.
         * @expectedException TimestampException
-        * @covers ConvertableTimestamp
+        * @covers ConvertibleTimestamp
         */
        public function testInvalidParse() {
-               new ConvertableTimestamp( "This is not a timestamp." );
+               new ConvertibleTimestamp( "This is not a timestamp." );
        }
 
        /**
         * @dataProvider provideValidTimestamps
-        * @covers ConvertableTimestamp::convert
+        * @covers ConvertibleTimestamp::convert
         */
        public function testConvert( $format, $expected, $original ) {
-               $this->assertSame( $expected, ConvertableTimestamp::convert( 
$format, $original ) );
+               $this->assertSame( $expected, ConvertibleTimestamp::convert( 
$format, $original ) );
        }
 
        /**
         * Format an invalid timestamp.
-        * @covers ConvertableTimestamp::convert
+        * @covers ConvertibleTimestamp::convert
         */
        public function testConvertInvalid() {
-               $this->assertSame( false, ConvertableTimestamp::convert( 'Not a 
timestamp', 0 ) );
+               $this->assertSame( false, ConvertibleTimestamp::convert( 'Not a 
timestamp', 0 ) );
        }
 
        /**
         * Test an out of range timestamp
         * @dataProvider provideOutOfRangeTimestamps
         * @expectedException TimestampException
-        * @covers ConvertableTimestamp
+        * @covers       ConvertibleTimestamp
         */
        public function testOutOfRangeTimestamps( $format, $input ) {
-               $timestamp = new ConvertableTimestamp( $input );
+               $timestamp = new ConvertibleTimestamp( $input );
                $timestamp->getTimestamp( $format );
        }
 
        /**
         * Test requesting an invalid output format.
         * @expectedException TimestampException
-        * @covers ConvertableTimestamp::getTimestamp
+        * @covers ConvertibleTimestamp::getTimestamp
         */
        public function testInvalidOutput() {
-               $timestamp = new ConvertableTimestamp( '1343761268' );
+               $timestamp = new ConvertibleTimestamp( '1343761268' );
                $timestamp->getTimestamp( 98 );
        }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3dcef9fb020c8c6764ee073111ed8c032e4c5a63
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to