Remove useless helpers.

This commit is contained in:
Daniele Alessandri
2012-07-25 21:18:58 +02:00
parent 89d6c0e9b6
commit c3cafaa9a6
6 changed files with 17 additions and 48 deletions
+8 -8
View File
@@ -17,7 +17,7 @@ use Predis\BasicClientInterface;
use Predis\ExecutableContextInterface;
use Predis\ResponseErrorInterface;
use Predis\Command\CommandInterface;
use Predis\Helpers;
use Predis\Connection\AggregatedConnectionInterface;
use Predis\ResponseQueued;
use Predis\ClientException;
use Predis\ServerException;
@@ -32,12 +32,12 @@ use Predis\Protocol\ProtocolException;
*/
class MultiExecContext implements BasicClientInterface, ExecutableContextInterface
{
const STATE_RESET = 0; // 0b00000
const STATE_INITIALIZED = 1; // 0b00001
const STATE_INSIDEBLOCK = 2; // 0b00010
const STATE_DISCARDED = 4; // 0b00100
const STATE_CAS = 8; // 0b01000
const STATE_WATCH = 16; // 0b10000
const STATE_RESET = 0; // 0b00000
const STATE_INITIALIZED = 1; // 0b00001
const STATE_INSIDEBLOCK = 2; // 0b00010
const STATE_DISCARDED = 4; // 0b00100
const STATE_CAS = 8; // 0b01000
const STATE_WATCH = 16; // 0b10000
private $state;
private $canWatch;
@@ -117,7 +117,7 @@ class MultiExecContext implements BasicClientInterface, ExecutableContextInterfa
*/
private function checkCapabilities(ClientInterface $client)
{
if (Helpers::isCluster($client->getConnection())) {
if ($client->getConnection() instanceof AggregatedConnectionInterface) {
throw new NotSupportedException('Cannot initialize a MULTI/EXEC context over a cluster of connections');
}