| Conditions | 5 |
| Paths | 6 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | public function execute(InputInterface $input, OutputInterface $output) |
||
| 26 | { |
||
| 27 | list($archive, $file) = $this->getArchiveAndFile($input, $output); |
||
| 28 | $destination = $input->getArgument('destination'); |
||
| 29 | if (is_dir($destination)) { |
||
|
|
|||
| 30 | $destination = $destination . '/' . basename($file); |
||
| 31 | } |
||
| 32 | |||
| 33 | $overwrite = $input->getOption('overwrite'); |
||
| 34 | |||
| 35 | if (file_exists($destination) && !$overwrite) { |
||
| 36 | if ($input->getOption('no-interaction')) { |
||
| 37 | throw new \LogicException('File destination ' . $destination . ' exists'); |
||
| 38 | } |
||
| 39 | } |
||
| 40 | |||
| 41 | return 0; |
||
| 42 | } |
||
| 44 |