Code Duplication    Length = 10-10 lines in 3 locations

src/CurlFtpAdapter.php 3 locations

@@ 186-195 (lines=10) @@
183
     *
184
     * @return bool
185
     */
186
    public function rename($path, $newpath)
187
    {
188
        $connection = $this->getConnection();
189
190
        $result = $connection->exec([
191
            CURLOPT_POSTQUOTE => ['RNFR '.$path, 'RNTO '.$newpath]
192
        ]);
193
194
        return $result !== false;
195
    }
196
197
    /**
198
     * Copy a file.
@@ 223-232 (lines=10) @@
220
     *
221
     * @return bool
222
     */
223
    public function delete($path)
224
    {
225
        $connection = $this->getConnection();
226
227
        $result = $connection->exec([
228
            CURLOPT_POSTQUOTE => ['DELE '.$path]
229
        ]);
230
231
        return $result !== false;
232
    }
233
234
    /**
235
     * Delete a directory.
@@ 241-250 (lines=10) @@
238
     *
239
     * @return bool
240
     */
241
    public function deleteDir($dirname)
242
    {
243
        $connection = $this->getConnection();
244
245
        $result = $connection->exec([
246
            CURLOPT_POSTQUOTE => ['RMD '.$dirname]
247
        ]);
248
249
        return $result !== false;
250
    }
251
252
    /**
253
     * Create a directory.