Rename variable and field.

This commit is contained in:
Daniele Alessandri
2012-07-26 12:18:28 +02:00
parent 81be513eaa
commit 36f8210864
+7 -5
View File
@@ -26,12 +26,14 @@ use Predis\ServerException;
*/
class StandardExecutor implements PipelineExecutorInterface
{
protected $exceptions;
/**
* @param bool $useServerExceptions Specifies if the executor should throw exceptions on server errors.
* @param bool $exceptions Specifies if the executor should throw exceptions on server errors.
*/
public function __construct($useServerExceptions = true)
public function __construct($exceptions = true)
{
$this->useServerExceptions = (bool) $useServerExceptions;
$this->exceptions = (bool) $exceptions;
}
/**
@@ -70,7 +72,7 @@ class StandardExecutor implements PipelineExecutorInterface
{
$size = count($commands);
$values = array();
$useServerExceptions = $this->useServerExceptions;
$exceptions = $this->exceptions;
$this->checkConnection($connection);
@@ -81,7 +83,7 @@ class StandardExecutor implements PipelineExecutorInterface
for ($i = 0; $i < $size; $i++) {
$response = $connection->readResponse($commands->dequeue());
if ($response instanceof ResponseErrorInterface && $useServerExceptions === true) {
if ($response instanceof ResponseErrorInterface && $exceptions === true) {
$this->onResponseError($connection, $response);
}