Delete::prepare()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 7
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 7
loc 7
ccs 0
cts 6
cp 0
rs 9.4286
cc 1
eloc 4
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * This file is part of the bee4/transport package.
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 *
7
 * @copyright Bee4 2015
8
 * @author  Stephane HULARD <[email protected]>
9
 * @package Bee4\Transport\Message\Request\Ftp
10
 */
11
12
namespace Bee4\Transport\Message\Request\Ftp;
13
14
/**
15
 * FTP DELETE Request object => Remove files from remote
16
 * @package Bee4\Transport\Message\Request\Ftp
17
 */
18 View Code Duplication
class Delete extends FtpRequest
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
19
{
20
    protected function prepare()
21
    {
22
        parent::prepare();
23
24
        $this->addOption(CURLOPT_NOBODY, true);
25
        $this->addOption(CURLOPT_POSTQUOTE, ['DELE '.$this->getUrl()->path()]);
26
    }
27
}
28