The property arguments of Hyperf\Amqp\Builder\Builder not only support array. (#1034)

This commit is contained in:
wiseker 2019-11-27 15:17:27 +08:00 committed by 李铭昕
parent ea71568980
commit 29c7aeecf6
2 changed files with 35 additions and 2 deletions

View File

@ -17,6 +17,7 @@
- [#1014](https://github.com/hyperf/hyperf/pull/1014) Optimized `Command:: execute` return value does not support null.
- [#1022](https://github.com/hyperf/hyperf/pull/1022) Provided cleaner connection pool error message without implementation details.
- [#1034](https://github.com/hyperf/hyperf/pull/1034) The property `arguments` of `Hyperf\Amqp\Builder\Builder` not only support array.
# v1.1.7 - 2019-11-21

View File

@ -12,18 +12,38 @@ declare(strict_types=1);
namespace Hyperf\Amqp\Builder;
use PhpAmqpLib\Wire\AMQPTable;
class Builder
{
/**
* @var bool
*/
protected $passive = false;
/**
* @var bool
*/
protected $durable = true;
/**
* @var bool
*/
protected $autoDelete = false;
/**
* @var bool
*/
protected $nowait = false;
/**
* @var AMQPTable|array
*/
protected $arguments = [];
/**
* @var null|int
*/
protected $ticket;
public function isPassive(): bool
@ -70,22 +90,34 @@ class Builder
return $this;
}
public function getArguments(): array
/**
* @return AMQPTable|array
*/
public function getArguments()
{
return $this->arguments;
}
public function setArguments(array $arguments): self
/**
* @param AMQPTable|array $arguments
*/
public function setArguments($arguments): self
{
$this->arguments = $arguments;
return $this;
}
/**
* @return null|int
*/
public function getTicket()
{
return $this->ticket;
}
/**
* @param null|int $ticket
*/
public function setTicket($ticket): self
{
$this->ticket = $ticket;