Code Duplication    Length = 12-12 lines in 2 locations

src/Webcreate/Conveyor/Transporter/FtpTransporter.php 1 location

@@ 141-152 (lines=12) @@
138
            $this->dispatcher->dispatch(TransporterEvents::TRANSPORTER_PUT, new TransporterEvent($this, array('dest' => $dest, 'src' => $file->getPathname())));
139
140
            ftp_put($this->stream, $dest, $file->getPathname(), FTP_BINARY);
141
        } else {
142
            if (!$this->exists($dest)) {
143
                $this->mkdir($dest);
144
            }
145
146
            $finder = new Finder();
147
            $test = $finder->in($src)->depth('== 0');
148
149
            foreach ($test as $file) {
150
                $this->put(rtrim($src, '/') . '/' . $file->getFilename(), rtrim($dest, '/')  . '/' . $file->getFilename());
151
            }
152
        }
153
    }
154
155
    public function putContent($content, $dest)

src/Webcreate/Conveyor/Transporter/SftpTransporter.php 1 location

@@ 252-263 (lines=12) @@
249
                    }
250
                }
251
            }
252
        } else {
253
            if (!$this->exists($dest)) {
254
                $this->mkdir($dest);
255
            }
256
257
            $finder = new Finder();
258
            $test = $finder->in($src)->depth('== 0');
259
260
            foreach ($test as $file) {
261
                $this->put(rtrim($src, '/') . '/' . $file->getFilename(), rtrim($dest, '/')  . '/' . $file->getFilename());
262
            }
263
        }
264
    }
265
266
    public function putContent($content, $dest)