Code Duplication    Length = 8-8 lines in 2 locations

src/MagentoHackathon/Composer/Magento/Deploystrategy/Copy.php 1 location

@@ 56-63 (lines=8) @@
53
            $mapSource = rtrim($mapSource, '*');
54
            if (strcmp(substr($cleanDest, strlen($mapDest)+1), substr($source, strlen($mapSource)+1)) === 0) {
55
                // copy each child of $sourcePath into $destPath
56
                foreach (new \DirectoryIterator($sourcePath) as $item) {
57
                    $item = (string) $item;
58
                    if (!strcmp($item, '.') || !strcmp($item, '..')) {
59
                        continue;
60
                    }
61
                    $childSource = $this->removeTrailingSlash($source) . '/' . $item;
62
                    $this->create($childSource, substr($destPath, strlen($this->getDestDir())+1));
63
                }
64
                return true;
65
            } else {
66
                $destPath = $this->removeTrailingSlash($destPath) . '/' . basename($source);

src/MagentoHackathon/Composer/Magento/Deploystrategy/Link.php 1 location

@@ 38-45 (lines=8) @@
35
        if (file_exists($destPath) && is_dir($destPath)) {
36
            if (basename($sourcePath) === basename($destPath)) {
37
                // copy/link each child of $sourcePath into $destPath
38
                foreach (new \DirectoryIterator($sourcePath) as $item) {
39
                    $item = (string) $item;
40
                    if (!strcmp($item, '.') || !strcmp($item, '..')) {
41
                        continue;
42
                    }
43
                    $childSource = $source . '/' . $item;
44
                    $this->create($childSource, substr($destPath, strlen($this->getDestDir())+1));
45
                }
46
                return true;
47
            } else {
48
                $destPath .= '/' . basename($source);