GetRequestBuilder::build()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 6

Duplication

Lines 11
Ratio 100 %

Importance

Changes 0
Metric Value
dl 11
loc 11
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 6
nc 2
nop 6
1
<?php
2
3
namespace Knp\FriendlyContexts\Builder;
4
5
6 View Code Duplication
class GetRequestBuilder extends AbstractRequestBuilder
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...
7
{
8
    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...
9
    {
10
        parent::build($uri, $queries, $headers, $postBody, $body, $options);
11
12
        $resource = $queries ?
13
            sprintf('%s?%s', $uri, $this->formatQueryString($queries)) :
14
            $uri
15
        ;
16
17
        return $this->getClient()->get($resource, $headers, $options);
18
    }
19
}
20