Passed
Pull Request — master (#62)
by Romain
02:05
created

ThreadRequest::buildQuery()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Kerox\Messenger\Request;
4
5
use Kerox\Messenger\Model\ThreadControl;
6
7
class ThreadRequest extends AbstractRequest
8
{
9
    /**
10
     * @var \Kerox\Messenger\Model\ThreadControl
11
     */
12
    protected $threadControl;
13
14
    /**
15
     * TagRequest constructor.
16
     *
17
     * @param string                               $pageToken
18
     * @param \Kerox\Messenger\Model\ThreadControl $threadControl
19
     */
20 2
    public function __construct($pageToken, ThreadControl $threadControl)
21
    {
22 2
        parent::__construct($pageToken);
23
24 2
        $this->threadControl = $threadControl;
25 2
    }
26
27
    /**
28
     * @return array
29
     */
30 2
    protected function buildHeaders(): array
31
    {
32
        return [
33 2
            'Content-Type' => 'application/json',
34
        ];
35
    }
36
37
    /**
38
     * @return \Kerox\Messenger\Model\ThreadControl
39
     */
40 2
    protected function buildBody(): ThreadControl
41
    {
42 2
        return $this->threadControl;
43
    }
44
45
    /**
46
     * @return array
47
     */
48 2
    protected function buildQuery(): array
49
    {
50 2
        return parent::buildQuery();
51
    }
52
}
53