Completed
Push — master ( 3347ae...8ec7fe )
by Romain
9s
created

ThreadRequest::buildQuery()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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