mirror of
https://github.com/predis/predis.git
synced 2026-09-05 07:16:44 +00:00
Rename variable and field.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user