SshRequest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 44
ccs 0
cts 5
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A prepare() 0 5 1
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\Ssh
10
 */
11
12
namespace Bee4\Transport\Message\Request\Ssh;
13
14
use Bee4\Transport\Message\Request\AbstractRequest;
15
16
class SshRequest extends AbstractRequest
17
{
18
    const STATUS_0  = "0  OK";
19
    const STATUS_1  = "1  EOF";
20
    const STATUS_2  = "2  No such file";
21
    const STATUS_3  = "3  Permission denied";
22
    const STATUS_4  = "4  Failure";
23
    const STATUS_5  = "5  Bad message";
24
    const STATUS_6  = "6  No connection";
25
    const STATUS_7  = "7  Connection lost";
26
    const STATUS_8  = "8  Operation unsupported";
27
    const STATUS_9  = "9  Invalid handle";
28
    const STATUS_10 = "10 No such path";
29
    const STATUS_11 = "11 File already exists";
30
    const STATUS_12 = "12 Write protect";
31
    const STATUS_13 = "13 No media";
32
    const STATUS_14 = "14 No space on file-system";
33
    const STATUS_15 = "15 Quota exceeded";
34
    const STATUS_16 = "16 Unknown principal";
35
    const STATUS_17 = "17 Lock conflict";
36
    const STATUS_18 = "18 Directory not empty";
37
    const STATUS_19 = "19 Not a directory";
38
    const STATUS_20 = "20 Invalid filename";
39
    const STATUS_21 = "21 Link loop";
40
    const STATUS_22 = "22 Cannot delete";
41
    const STATUS_23 = "23 Invalid parameter";
42
    const STATUS_24 = "24 File is a directory";
43
    const STATUS_25 = "25 Range lock conflict";
44
    const STATUS_26 = "26 Range lock refused";
45
    const STATUS_27 = "27 Delete pending";
46
    const STATUS_28 = "28 File corrupt";
47
    const STATUS_29 = "29 Owner invalid";
48
    const STATUS_30 = "30 Group invalid";
49
    const STATUS_31 = "31 No matching byte range lock";
50
51
    /**
52
     * Prepare the request execution by adding specific cURL parameters
53
     */
54
    protected function prepare()
55
    {
56
        $this->addOption(CURLOPT_SSH_AUTH_TYPES, CURLSSH_AUTH_ANY);
57
        $this->addOption(CURLOPT_PROTOCOLS, CURLPROTO_SCP|CURLPROTO_SFTP);
58
    }
59
}
60