Skip to content

Commit 0a6c562

Browse files
committed
Split elseifs in ifs
1 parent be9f002 commit 0a6c562

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/MessageConsumeCommand.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,17 @@ protected function execute(InputInterface $input, OutputInterface $output)
5858

5959
if (!$container->has($receiverName = $input->getArgument('receiver'))) {
6060
throw new \RuntimeException(sprintf('Receiver "%s" does not exist.', $receiverName));
61-
} elseif (!($receiver = $container->get($receiverName)) instanceof ReceiverInterface) {
61+
}
62+
63+
if (!($receiver = $container->get($receiverName)) instanceof ReceiverInterface) {
6264
throw new \RuntimeException(sprintf('Receiver "%s" is not a valid message consumer. It must implement the "%s" interface.', $receiverName, ReceiverInterface::class));
6365
}
6466

6567
if (!$container->has($busName = $input->getOption('bus'))) {
6668
throw new \RuntimeException(sprintf('Bus "%s" does not exist.', $busName));
67-
} elseif (!($messageBus = $container->get($busName)) instanceof MessageBusInterface) {
69+
}
70+
71+
if (!($messageBus = $container->get($busName)) instanceof MessageBusInterface) {
6872
throw new \RuntimeException(sprintf('Bus "%s" is not a valid message bus. It must implement the "%s" interface.', $busName, MessageBusInterface::class));
6973
}
7074

0 commit comments

Comments
 (0)