mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-22 17:16:18 +02:00
add type hint, remove Exception
This commit is contained in:
@@ -34,12 +34,9 @@ class AmqpHandler extends AbstractProcessingHandler
|
|||||||
* @param int $level
|
* @param int $level
|
||||||
* @param bool $bubble Whether the messages that are handled can bubble up the stack or not
|
* @param bool $bubble Whether the messages that are handled can bubble up the stack or not
|
||||||
*/
|
*/
|
||||||
public function __construct($exchange, $exchangeName = 'log', $issuer = 'default', $level = Logger::DEBUG, $bubble = true)
|
public function __construct(\AMQPExchange $exchange, $exchangeName = 'log', $issuer = 'default', $level = Logger::DEBUG, $bubble = true)
|
||||||
{
|
{
|
||||||
if (!$exchange instanceof \AMQPExchange) {
|
$this->issuer = $issuer;
|
||||||
throw new \LogicException('AMQP handler requires a valid exchange to be provided');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->exchange = $exchange;
|
$this->exchange = $exchange;
|
||||||
$this->exchange->setName($exchangeName);
|
$this->exchange->setName($exchangeName);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user