Completed
Pull Request — master (#12)
by Tobias
05:07
created

Addon::toJson()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
ccs 0
cts 3
cp 0
crap 2
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace SolutionDrive\HipchatAPIv2Client\Model;
4
5
class Addon implements AddonInterface
6
{
7
    private $target;
8
    private $ttl;
9
    private $token;
10
11
    /**
12
     * @inheritdoc
13
     */
14
    public function toJson()
15
    {
16
        return [
17
            'target' => $this->getTarget(),
18
            'ttl'    => $this->getTTL(),
19
        ];
20
    }
21
22
    /**
23
     * @inheritdoc
24
     */
25 1
    public function setTarget($target)
26
    {
27 1
        $this->target = $target;
28 1
    }
29
30
    /**
31
     * @inheritdoc
32
     */
33 1
    public function setTTL($ttl)
34
    {
35 1
        $this->ttl = $ttl;
36 1
    }
37
38
    /**
39
     * @inheritdoc
40
     */
41 1
    public function setToken($token)
42
    {
43 1
        $this->token = $token;
44 1
    }
45
46
    /**
47
     * @inheritdoc
48
     */
49 1
    public function getTarget()
50
    {
51 1
        return $this->target;
52
    }
53
54
    /**
55
     * @inheritdoc
56
     */
57 1
    public function getTTL()
58
    {
59 1
        return $this->ttl;
60
    }
61
62
    /**
63
     * @inheritdoc
64
     */
65 1
    public function getToken()
66
    {
67 1
        return $this->token;
68
    }
69
}
70