diff --git a/src/Channel.php b/src/Channel.php index c395a3f..9aadd92 100644 --- a/src/Channel.php +++ b/src/Channel.php @@ -382,7 +382,7 @@ public function txRollback(): \Bunny\Protocol\MethodTxRollbackOkFrame /** * Changes channel to confirm mode. Broker then asynchronously sends 'basic.ack's for published messages. */ - public function confirmSelect(callable $callback = null, bool $nowait = false): \Bunny\Protocol\MethodConfirmSelectOkFrame + public function confirmSelect(?callable $callback = null, bool $nowait = false): \Bunny\Protocol\MethodConfirmSelectOkFrame { if ($this->mode !== ChannelMode::Regular) { throw new ChannelException("Channel not in regular mode, cannot change to transactional mode."); @@ -394,7 +394,7 @@ public function confirmSelect(callable $callback = null, bool $nowait = false): return $response; } - private function enterConfirmMode(callable $callback = null): void + private function enterConfirmMode(?callable $callback = null): void { $this->mode = ChannelMode::Confirm; $this->deliveryTag = 0; diff --git a/src/ChannelInterface.php b/src/ChannelInterface.php index 4333a2e..312f0d3 100644 --- a/src/ChannelInterface.php +++ b/src/ChannelInterface.php @@ -114,6 +114,6 @@ public function txRollback(): \Bunny\Protocol\MethodTxRollbackOkFrame; /** * Changes channel to confirm mode. Broker then asynchronously sends 'basic.ack's for published messages. */ - public function confirmSelect(callable $callback = null, bool $nowait = false): \Bunny\Protocol\MethodConfirmSelectOkFrame; + public function confirmSelect(?callable $callback = null, bool $nowait = false): \Bunny\Protocol\MethodConfirmSelectOkFrame; } diff --git a/test/Library/SynchronousClientHelper.php b/test/Library/SynchronousClientHelper.php index c6fc506..19e07dc 100644 --- a/test/Library/SynchronousClientHelper.php +++ b/test/Library/SynchronousClientHelper.php @@ -14,7 +14,7 @@ final class SynchronousClientHelper extends AbstractClientHelper * * @return Client */ - public function createClient(array $options = null): Client + public function createClient(?array $options = null): Client { $options = array_merge($this->getDefaultOptions(), $options ?? []);