Completed
Pull Request — master (#68)
by
unknown
06:34
created

QueryNext   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 81.82%

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 0
dl 0
loc 34
ccs 9
cts 11
cp 0.8182
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getEndpoint() 0 4 1
A getMethod() 0 4 1
A getParams() 0 4 1
A getMediaType() 0 4 1
1
<?php
2
3
namespace Xsolve\SalesforceClient\Request;
4
5
class QueryNext implements RequestInterface
6
{
7
    const ENDPOINT = '/query/%s';
8
9
    /**
10
     * @var string
11
     */
12
    private $nextResultIdentifier;
13
14 2
    public function __construct(string $nextResultIdentifier)
15
    {
16 2
        $this->nextResultIdentifier = $nextResultIdentifier;
17 2
    }
18
19 2
    public function getEndpoint(): string
20
    {
21 2
        return sprintf(self::ENDPOINT, $this->nextResultIdentifier);
22
    }
23
24 1
    public function getMethod(): string
25
    {
26 1
        return self::METHOD_GET;
27
    }
28
29 1
    public function getParams(): string
30
    {
31 1
        return '';
32
    }
33
34
    public function getMediaType(): string
35
    {
36
        return self::TYPE_FORM;
37
    }
38
}
39