| Conditions | 3 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 53 | public function execute(InputInterface $input, OutputInterface $output) |
||
| 54 | { |
||
| 55 | $queueNames = array_map('trim', explode(',', $input->getOption('queues'))); |
||
|
|
|||
| 56 | $queueNames = !empty($queues) ?: $this->jm->getDriver()->listQueues(); |
||
| 57 | |||
| 58 | foreach ($queueNames as $queueName) { |
||
| 59 | $action = new AsyncAction(Ping::class, 'ping'); |
||
| 60 | $action->withPreferredQueueName($queueName); |
||
| 61 | $this->jm->dispatch($action); |
||
| 62 | |||
| 63 | $output->writeln('Ping sent to: ' . $queueName); |
||
| 64 | } |
||
| 65 | } |
||
| 66 | } |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVarassignment in line 1 and the$higherassignment in line 2 are dead. The first because$myVaris never used and the second because$higheris always overwritten for every possible time line.