Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
54 | protected function execute(InputInterface $input, OutputInterface $output) |
||
55 | { |
||
56 | parent::execute($input, $output); |
||
57 | $force = false; |
||
58 | if ($input->getOption('force')) { |
||
59 | $force = true; |
||
60 | } |
||
61 | if ($input->hasArgument('indexName') && null !== $indexName = $input->getArgument('indexName')) { |
||
62 | $output->writeln('Remapping and recreating index ' . $indexName); |
||
63 | $this->indexService->remap($indexName, $force); |
||
|
|||
64 | } else { |
||
65 | $output->writeln('Remapping and recreating all configured indices.'); |
||
66 | $this->indexService->remapAll($force); |
||
67 | } |
||
68 | } |
||
69 | |||
71 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.