| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 53 | 1 | public function execute(ManagerInterface $manager, Import $import) |
|
|
|
|||
| 54 | { |
||
| 55 | 1 | $configuration = $import->getStrategy() |
|
| 56 | 1 | ->getConfiguration(); |
|
| 57 | 1 | if (isset($configuration['after']['rename'])) { |
|
| 58 | 1 | $oldFileName = $this->fileService->getFileAbsFileName($import->getFilepath()); |
|
| 59 | 1 | $info = pathinfo($oldFileName); |
|
| 60 | 1 | $newFileName = $info['dirname'] . DIRECTORY_SEPARATOR . date('YmdHis') . '_' . $info['basename']; |
|
| 61 | 1 | rename($oldFileName, $newFileName); |
|
| 62 | } |
||
| 63 | 1 | } |
|
| 64 | } |
||
| 65 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.