Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
13 | public function run(): void |
||
14 | { |
||
15 | $targetDir = $this->getTargetDir(); |
||
16 | $sourceFiles = $this->getSourceFiles(); |
||
17 | foreach ($sourceFiles as $sourceFilePath) { |
||
18 | $sourceFilename = basename($sourceFilePath); |
||
19 | $targetFilePath = $targetDir . '/' . $sourceFilename; |
||
20 | if (file_exists($targetFilePath)) { |
||
21 | unlink($targetFilePath); |
||
22 | } |
||
23 | copy($sourceFilePath, $targetFilePath); |
||
24 | } |
||
57 |