Code Duplication    Length = 14-14 lines in 3 locations

src/Knp/FriendlyContexts/Builder/GetRequestBuilder.php 1 location

@@ 6-19 (lines=14) @@
3
namespace Knp\FriendlyContexts\Builder;
4
5
6
class GetRequestBuilder extends AbstractRequestBuilder
7
{
8
    public function build($uri = null, array $queries = null, array $headers = null, array $postBody = null, $body = null, array $options = [])
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

src/Knp/FriendlyContexts/Builder/HeadRequestBuilder.php 1 location

@@ 5-18 (lines=14) @@
2
3
namespace Knp\FriendlyContexts\Builder;
4
5
class HeadRequestBuilder extends AbstractRequestBuilder
6
{
7
    public function build($uri = null, array $queries = null, array $headers = null, array $postBody = null, $body = null, array $options = [])
8
    {
9
        parent::build($uri, $queries, $headers, $postBody, $body, $options);
10
11
        $resource = $queries ?
12
            sprintf('%s?%s', $uri, $this->formatQueryString($queries)) :
13
            $uri
14
        ;
15
16
        return $this->getClient()->head($resource, $headers, $options);
17
    }
18
}
19

src/Knp/FriendlyContexts/Builder/OptionsRequestBuilder.php 1 location

@@ 5-18 (lines=14) @@
2
3
namespace Knp\FriendlyContexts\Builder;
4
5
class OptionsRequestBuilder extends AbstractRequestBuilder
6
{
7
    public function build($uri = null, array $queries = null, array $headers = null, array $postBody = null, $body = null, array $options = [])
8
    {
9
        parent::build($uri, $queries, $headers, $postBody, $body, $options);
10
11
        $resource = $queries ?
12
            sprintf('%s?%s', $uri, $this->formatQueryString($queries)) :
13
            $uri
14
        ;
15
16
        return $this->getClient()->options($resource, $options);
17
    }
18
}
19