mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-17 06:36:48 +02:00
add type hint, remove Exception
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user