mirror of
https://github.com/predis/predis.git
synced 2026-08-31 04:35:05 +00:00
Use instanceof instead of the deprecated is_a().
This commit is contained in:
+2
-2
@@ -124,7 +124,7 @@ class Client {
|
||||
|
||||
public function executeCommandOnShards(Command $command) {
|
||||
$replies = array();
|
||||
if (is_a($this->_connection, '\Predis\ConnectionCluster')) {
|
||||
if ($this->_connection instanceof \Predis\ConnectionCluster) {
|
||||
foreach($this->_connection as $connection) {
|
||||
$replies[] = self::executeCommandInternal($connection, $command);
|
||||
}
|
||||
@@ -136,7 +136,7 @@ class Client {
|
||||
}
|
||||
|
||||
public function rawCommand($rawCommandData, $closesConnection = false) {
|
||||
if (is_a($this->_connection, '\Predis\ConnectionCluster')) {
|
||||
if ($this->_connection instanceof \Predis\ConnectionCluster) {
|
||||
throw new ClientException('Cannot send raw commands when connected to a cluster of Redis servers');
|
||||
}
|
||||
return $this->_connection->rawCommand($rawCommandData, $closesConnection);
|
||||
|
||||
Reference in New Issue
Block a user