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

ThreadRequest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 46
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A buildHeaders() 0 6 1
A buildBody() 0 4 1
A buildQuery() 0 4 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