POSTFile   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A setBody() 0 5 1
1
<?php
2
/**
3
 * ©[2016] SugarCRM Inc.  Licensed by SugarCRM under the Apache 2.0 license.
4
 */
5
6
namespace SugarAPI\SDK\Request;
7
8
class POSTFile extends POST {
9
10
    /**
11
     * @inheritdoc
12
     */
13
    protected static $_DEFAULT_HEADERS = array(
14
        "Content-Type: multipart/form-data"
15
    );
16
17
    /**
18
     * Overrides POST setBody, so that Body is not json encoded
19
     * @inheritdoc
20
     */
21
    public function setBody($body){
22
        $this->body = $body;
23
        $this->setOption(CURLOPT_POSTFIELDS, $this->body);
24
        return $this;
25
    }
26
27
}