Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 207-217 (lines=11) @@
204
     * @param $dest
205
     * @return bool
206
     */
207
    public function isSymlink($dest)
208
    {
209
        $remoteCommand = sprintf("readlink %s", $dest);
210
        $commandline   = sprintf("ssh %s@%s \"%s\"", $this->getUser(), $this->getHost(), $remoteCommand);
211
212
        if ($this->cli->execute($commandline)) {
213
            return false;
214
        }
215
216
        return ('' !== trim($this->cli->getOutput()));
217
    }
218
219
    /**
220
     * Copies a file/directory on the remote host

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

@@ 192-202 (lines=11) @@
189
     * @param $dest
190
     * @return bool
191
     */
192
    public function isSymlink($dest)
193
    {
194
        $remoteCommand = sprintf("readlink %s", $dest);
195
        $commandline   = sprintf("ssh %s@%s \"%s\"", $this->getUser(), $this->getHost(), $remoteCommand);
196
197
        if ($this->cli->execute($commandline)) {
198
            return false;
199
        }
200
201
        return ('' !== trim($this->cli->getOutput()));
202
    }
203
204
    /**
205
     * Copies a file/directory on the remote host