Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
47 | protected function execute(InputInterface $input, OutputInterface $output) |
||
48 | { |
||
49 | $service = $input->getArgument('service'); |
||
50 | $className = get_class($this->getContainer()->get($service)); |
||
|
|||
51 | if ($input->getOption('oneline')) { |
||
52 | $output->write($className); |
||
53 | } else { |
||
54 | $output->writeln("<comment>Class name:</> ".$className); |
||
55 | } |
||
56 | } |
||
57 | } |
||
58 |
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.