diff --git a/lib/Predis/Commands/Keys_v1_2.php b/lib/Predis/Commands/KeysV12x.php similarity index 79% rename from lib/Predis/Commands/Keys_v1_2.php rename to lib/Predis/Commands/KeysV12x.php index 0f6ae567..a4483891 100644 --- a/lib/Predis/Commands/Keys_v1_2.php +++ b/lib/Predis/Commands/KeysV12x.php @@ -2,7 +2,7 @@ namespace Predis\Commands; -class Keys_v1_2 extends Keys { +class KeysV12x extends Keys { public function parseResponse($data) { return explode(' ', $data); } diff --git a/lib/Predis/Profiles/ServerProfile.php b/lib/Predis/Profiles/ServerProfile.php index a692620c..e35a9121 100644 --- a/lib/Predis/Profiles/ServerProfile.php +++ b/lib/Predis/Profiles/ServerProfile.php @@ -24,11 +24,11 @@ abstract class ServerProfile implements IServerProfile { private static function getDefaultProfiles() { return array( - '1.2' => '\Predis\Profiles\Server_v1_2', - '2.0' => '\Predis\Profiles\Server_v2_0', - '2.2' => '\Predis\Profiles\Server_v2_2', - 'default' => '\Predis\Profiles\Server_v2_2', - 'dev' => '\Predis\Profiles\Server_vNext', + '1.2' => '\Predis\Profiles\ServerVersion12', + '2.0' => '\Predis\Profiles\ServerVersion20', + '2.2' => '\Predis\Profiles\ServerVersion22', + 'default' => '\Predis\Profiles\ServerVersion22', + 'dev' => '\Predis\Profiles\ServerVersionNext', ); } diff --git a/lib/Predis/Profiles/Server_v1_2.php b/lib/Predis/Profiles/ServerVersion12.php similarity index 99% rename from lib/Predis/Profiles/Server_v1_2.php rename to lib/Predis/Profiles/ServerVersion12.php index 7e06f80a..a83fbd8d 100644 --- a/lib/Predis/Profiles/Server_v1_2.php +++ b/lib/Predis/Profiles/ServerVersion12.php @@ -2,7 +2,7 @@ namespace Predis\Profiles; -class Server_v1_2 extends ServerProfile { +class ServerVersion12 extends ServerProfile { public function getVersion() { return '1.2'; } public function getSupportedCommands() { return array( @@ -31,7 +31,7 @@ class Server_v1_2 extends ServerProfile { 'type' => '\Predis\Commands\Type', /* commands operating on the key space */ - 'keys' => '\Predis\Commands\Keys_v1_2', + 'keys' => '\Predis\Commands\KeysV12x', 'randomkey' => '\Predis\Commands\RandomKey', 'rename' => '\Predis\Commands\Rename', 'renamenx' => '\Predis\Commands\RenamePreserve', diff --git a/lib/Predis/Profiles/Server_v2_0.php b/lib/Predis/Profiles/ServerVersion20.php similarity index 98% rename from lib/Predis/Profiles/Server_v2_0.php rename to lib/Predis/Profiles/ServerVersion20.php index 8b1d9abb..e39b8643 100644 --- a/lib/Predis/Profiles/Server_v2_0.php +++ b/lib/Predis/Profiles/ServerVersion20.php @@ -2,7 +2,7 @@ namespace Predis\Profiles; -class Server_v2_0 extends Server_v1_2 { +class ServerVersion20 extends ServerVersion12 { public function getVersion() { return '2.0'; } public function getSupportedCommands() { return array_merge(parent::getSupportedCommands(), array( diff --git a/lib/Predis/Profiles/Server_v2_2.php b/lib/Predis/Profiles/ServerVersion22.php similarity index 96% rename from lib/Predis/Profiles/Server_v2_2.php rename to lib/Predis/Profiles/ServerVersion22.php index 54c6f04e..b7984e27 100644 --- a/lib/Predis/Profiles/Server_v2_2.php +++ b/lib/Predis/Profiles/ServerVersion22.php @@ -2,7 +2,7 @@ namespace Predis\Profiles; -class Server_v2_2 extends Server_v2_0 { +class ServerVersion22 extends ServerVersion20 { public function getVersion() { return '2.2'; } public function getSupportedCommands() { return array_merge(parent::getSupportedCommands(), array( diff --git a/lib/Predis/Profiles/Server_vNext.php b/lib/Predis/Profiles/ServerVersionNext.php similarity index 63% rename from lib/Predis/Profiles/Server_vNext.php rename to lib/Predis/Profiles/ServerVersionNext.php index 6d9a6fe5..9963cf8e 100644 --- a/lib/Predis/Profiles/Server_vNext.php +++ b/lib/Predis/Profiles/ServerVersionNext.php @@ -2,6 +2,6 @@ namespace Predis\Profiles; -class Server_vNext extends Server_v2_2 { +class ServerVersionNext extends ServerVersion22 { public function getVersion() { return 'DEV'; } } diff --git a/test/PredisFeaturesTest.php b/test/PredisFeaturesTest.php index 1a551774..aeb9df8a 100644 --- a/test/PredisFeaturesTest.php +++ b/test/PredisFeaturesTest.php @@ -102,10 +102,10 @@ class PredisClientFeaturesTestSuite extends PHPUnit_Framework_TestCase { /* Predis\Profiles\ServerProfile and derivates */ function testServerProfile_GetSpecificVersions() { - $this->assertType('\Predis\Profiles\Server_v1_2', \Predis\Profiles\ServerProfile::get('1.2')); - $this->assertType('\Predis\Profiles\Server_v2_0', \Predis\Profiles\ServerProfile::get('2.0')); - $this->assertType('\Predis\Profiles\Server_v2_2', \Predis\Profiles\ServerProfile::get('2.2')); - $this->assertType('\Predis\Profiles\Server_vNext', \Predis\Profiles\ServerProfile::get('dev')); + $this->assertType('\Predis\Profiles\ServerVersion12', \Predis\Profiles\ServerProfile::get('1.2')); + $this->assertType('\Predis\Profiles\ServerVersion20', \Predis\Profiles\ServerProfile::get('2.0')); + $this->assertType('\Predis\Profiles\ServerVersion22', \Predis\Profiles\ServerProfile::get('2.2')); + $this->assertType('\Predis\Profiles\ServerVersionNext', \Predis\Profiles\ServerProfile::get('dev')); $this->assertType('\Predis\Profiles\ServerProfile', \Predis\Profiles\ServerProfile::get('default')); $this->assertEquals(\Predis\Profiles\ServerProfile::get('default'), \Predis\Profiles\ServerProfile::getDefault()); }