mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-23 01:26:11 +02:00
Type fixes
This commit is contained in:
@@ -32,14 +32,14 @@ class AmqpHandler extends AbstractProcessingHandler
|
||||
|
||||
/**
|
||||
* @param AMQPExchange|AMQPChannel $exchange AMQPExchange (php AMQP ext) or PHP AMQP lib channel, ready for use
|
||||
* @param string $exchangeName Optional exchange name, for AMQPChannel (PhpAmqpLib) only
|
||||
* @param string|null $exchangeName Optional exchange name, for AMQPChannel (PhpAmqpLib) only
|
||||
* @param string|int $level The minimum logging level at which this handler will be triggered
|
||||
* @param bool $bubble Whether the messages that are handled can bubble up the stack or not
|
||||
*/
|
||||
public function __construct($exchange, ?string $exchangeName = null, $level = Logger::DEBUG, bool $bubble = true)
|
||||
{
|
||||
if ($exchange instanceof AMQPChannel) {
|
||||
$this->exchangeName = $exchangeName;
|
||||
$this->exchangeName = (string) $exchangeName;
|
||||
} elseif (!$exchange instanceof AMQPExchange) {
|
||||
throw new \InvalidArgumentException('PhpAmqpLib\Channel\AMQPChannel or AMQPExchange instance required');
|
||||
} elseif ($exchangeName) {
|
||||
|
Reference in New Issue
Block a user