Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 1.0008 |
Changes | 0 |
1 | <?php |
||
45 | 3 | protected function doExecuteCommand(InputInterface $input, OutputInterface $output) |
|
46 | { |
||
47 | 3 | $cloud = $this->getCloud($input); |
|
48 | 3 | $preset = $input->getArgument('preset'); |
|
49 | 3 | $profile = $cloud->addProfileFromPreset($preset); |
|
|
|||
50 | 1 | $output->writeln( |
|
51 | sprintf( |
||
52 | 1 | '<info>Successfully created profile %s with id %s</info>', |
|
53 | 1 | $profile->getName(), |
|
54 | 1 | $profile->getId() |
|
55 | ) |
||
56 | ); |
||
57 | 1 | } |
|
58 | } |
||
59 |
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.