diff --git a/src/Codeception/Module/AMQP.php b/src/Codeception/Module/AMQP.php index ff70cd9..f185d06 100644 --- a/src/Codeception/Module/AMQP.php +++ b/src/Codeception/Module/AMQP.php @@ -100,7 +100,8 @@ public function _before(TestInterface $test): void $this->cleanup(); } - if ($this->config['reconnect']) { + // Null coalescing can be removed if the class is made final + if ($this->config['reconnect'] ?? false) { $this->getChannel()->getConnection()->reconnect(); } }