PostRequestBuilder::build()   A
last analyzed

Complexity

Conditions 3
Paths 4

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 3
eloc 5
nc 4
nop 6
1
<?php
2
3
namespace Knp\FriendlyContexts\Builder;
4
5
class PostRequestBuilder extends AbstractRequestBuilder
6
{
7
    public function build($uri = null, array $queries = null, array $headers = null, array $postBody = null, $body = null, array $options = [])
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
8
    {
9
        parent::build($uri, $queries, $headers, $postBody, $body, $options);
10
11
        $resource = $queries ? sprintf('%s?%s', $uri, $this->formatQueryString($queries)) : $uri;
12
        $postBody = $postBody ?: $body;
13
14
        return $this->getClient()->post($resource, $headers, $postBody, $options);
15
    }
16
}
17