Post::prepare()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4286
cc 1
eloc 3
nc 1
nop 0
crap 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\Http
10
 */
11
12
namespace Bee4\Transport\Message\Request\Http;
13
14
use Bee4\Transport\Message\WithBodyTrait;
15
16
/**
17
 * HTTP POST Request object
18
 * @package Bee4\Transport\Message\Request\Http
19
 */
20
class Post extends HttpRequest
21
{
22
    use WithBodyTrait;
23
24 2
    protected function prepare()
25
    {
26 2
        $this->addOption(CURLOPT_POST, true);
27 2
        $this->addOption(CURLOPT_POSTFIELDS, $this->getBody());
28 2
    }
29
}
30