Conditions | 4 |
Paths | 6 |
Total Lines | 19 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | public function execute(InputInterface $input, OutputInterface $output) |
||
24 | { |
||
25 | $archive = $this->getArchive($input, $output); |
||
26 | $comment = $input->getArgument('comment'); |
||
27 | if (empty($comment)) { |
||
28 | $comment = null; |
||
29 | } |
||
30 | |||
31 | if (!empty($previous_comment = $archive->getComment())) { |
||
|
|||
32 | $output->writeln('Comment "' . $previous_comment . '" replaced', OutputInterface::OUTPUT_RAW); |
||
33 | } else if ($comment === null) { |
||
34 | $output->writeln('Comment deleted', OutputInterface::OUTPUT_RAW); |
||
35 | } else { |
||
36 | $output->writeln('Comment set', OutputInterface::OUTPUT_RAW); |
||
37 | } |
||
38 | |||
39 | $archive->setComment($comment); |
||
40 | |||
41 | return 0; |
||
42 | } |
||
44 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.