Code Duplication    Length = 11-11 lines in 2 locations

src/Task/BuiltIn/Deploy/RsyncTask.php 1 location

@@ 56-66 (lines=11) @@
53
        return $process->isSuccessful();
54
    }
55
56
    protected function getExcludes()
57
    {
58
        $excludes = $this->runtime->getMergedOption('exclude', []);
59
        $excludes = array_merge(['.git'], array_filter($excludes));
60
61
        foreach ($excludes as &$exclude) {
62
            $exclude = '--exclude=' . $exclude;
63
        }
64
65
        return implode(' ', $excludes);
66
    }
67
}
68

src/Task/BuiltIn/Deploy/Tar/PrepareTask.php 1 location

@@ 53-63 (lines=11) @@
50
        return $process->isSuccessful();
51
    }
52
53
    protected function getExcludes()
54
    {
55
        $excludes = $this->runtime->getMergedOption('exclude', []);
56
        $excludes = array_merge(['.git'], array_filter($excludes));
57
58
        foreach ($excludes as &$exclude) {
59
            $exclude = '--exclude="' . $exclude . '"';
60
        }
61
62
        return implode(' ', $excludes);
63
    }
64
}
65