From fb19840a8f02ec8025027aa09fb463f530e84ad5 Mon Sep 17 00:00:00 2001 From: pomaxa Date: Wed, 13 Jun 2012 17:36:25 +0300 Subject: [PATCH] add type hint, remove Exception --- src/Monolog/Handler/AmqpHandler.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Monolog/Handler/AmqpHandler.php b/src/Monolog/Handler/AmqpHandler.php index 64ef53b3..13c7351c 100644 --- a/src/Monolog/Handler/AmqpHandler.php +++ b/src/Monolog/Handler/AmqpHandler.php @@ -34,12 +34,9 @@ class AmqpHandler extends AbstractProcessingHandler * @param int $level * @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) { - throw new \LogicException('AMQP handler requires a valid exchange to be provided'); - } - + $this->issuer = $issuer; $this->exchange = $exchange; $this->exchange->setName($exchangeName);