Code Duplication    Length = 4-5 lines in 2 locations

src/Task/Archive/Extract.php 1 location

@@ 91-95 (lines=5) @@
88
     */
89
    public function run()
90
    {
91
        if (!file_exists($this->filename)) {
92
            $this->printTaskError("File {filename} does not exist", ['filename' => $this->filename]);
93
94
            return false;
95
        }
96
        if (!($mimetype = static::archiveType($this->filename))) {
97
            $this->printTaskError("Could not determine type of archive for {filename}", ['filename' => $this->filename]);
98

src/Task/File/Replace.php 1 location

@@ 119-122 (lines=4) @@
116
     */
117
    public function run()
118
    {
119
        if (!file_exists($this->filename)) {
120
            $this->printTaskError('File {filename} does not exist', ['filename' => $this->filename]);
121
            return false;
122
        }
123
124
        $text = file_get_contents($this->filename);
125
        if ($this->regex) {