Code Duplication    Length = 10-10 lines in 3 locations

src/CurlFtpAdapter.php 3 locations

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