Closed villfa closed 4 months ago
Hi,
I work on a project where we override publishBasic() like this:
publishBasic()
try { parent::publishBasic($msg, $exchange, $destination, $mandatory, $immediate, $ticket); } catch (AMQPConnectionClosedException|AMQPChannelClosedException) { $this->reconnect(); parent::publishBasic($msg, $exchange, $destination, $mandatory, $immediate, $ticket); }
but PHPStan emits this error:
Dead catch - PhpAmqpLib\Exception\AMQPChannelClosedException\|PhpAmqpLib\Exception\AMQPConnectionClosedException is never thrown in the try block.
These changes will fix this issue.
Hi,
I work on a project where we override
publishBasic()
like this:but PHPStan emits this error:
These changes will fix this issue.