Job::getFrom()   A
last analyzed

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 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Messenger\Hipchat;
4
5
use Cronario\AbstractJob;
6
7
class Job extends AbstractJob
8
{
9
10
    const P_PARAM_TOKEN = 'token';
11
    const P_PARAM_ROOM = 'room';
12
    const P_PARAM_FROM = 'from';
13
    const P_PARAM_MSG = 'msg';
14
    const P_PARAM_COLOUR = 'colour'; // yellow ...
15
    const P_PARAM_COLOUR_T_RANDOM = \HipChat\HipChat::COLOR_RANDOM;
16
    const P_PARAM_COLOUR_T_YELLOW = \HipChat\HipChat::COLOR_YELLOW;
17
    const P_PARAM_COLOUR_T_GRAY = \HipChat\HipChat::COLOR_GRAY;
18
    const P_PARAM_COLOUR_T_GREEN = \HipChat\HipChat::COLOR_GREEN;
19
    const P_PARAM_COLOUR_T_PURPLE = \HipChat\HipChat::COLOR_PURPLE;
20
    const P_PARAM_COLOUR_T_RED = \HipChat\HipChat::COLOR_RED;
21
    const P_PARAM_FORMAT = 'format'; // text
22
    const P_PARAM_FORMAT_T_TEXT = \HipChat\HipChat::FORMAT_TEXT;
23
    const P_PARAM_FORMAT_T_HTML = \HipChat\HipChat::FORMAT_HTML;
24
25
    /**
26
     * @return null
27
     */
28 3
    public function getToken()
29
    {
30 3
        return $this->getParam(self::P_PARAM_TOKEN);
31
    }
32
33
    /**
34
     * @param $value
35
     *
36
     * @return $this
37
     */
38 3
    public function setToken($value)
39
    {
40 3
        return $this->setParam(self::P_PARAM_TOKEN, $value);
41
    }
42
43
    /**
44
     * @return null
45
     */
46 3
    public function getRoom()
47
    {
48 3
        return $this->getParam(self::P_PARAM_ROOM);
49
    }
50
51
    /**
52
     * @param $value
53
     *
54
     * @return $this
55
     */
56 3
    public function setRoom($value)
57
    {
58 3
        return $this->setParam(self::P_PARAM_ROOM, $value);
59
    }
60
61
    /**
62
     * @return null
63
     */
64 3
    public function getFrom()
65
    {
66 3
        return $this->getParam(self::P_PARAM_FROM);
67
    }
68
69
    /**
70
     * @param $value
71
     *
72
     * @return $this
73
     */
74 3
    public function setFrom($value)
75
    {
76 3
        return $this->setParam(self::P_PARAM_FROM, $value);
77
    }
78
79
    /**
80
     * @return null
81
     */
82 3
    public function getMsg()
83
    {
84 3
        return $this->getParam(self::P_PARAM_MSG);
85
    }
86
87
    /**
88
     * @param $value
89
     *
90
     * @return $this
91
     */
92 2
    public function setMsg($value)
93
    {
94 2
        return $this->setParam(self::P_PARAM_MSG, $value);
95
    }
96
97
    /**
98
     * @return null
99
     */
100 2
    public function getColour()
101
    {
102 2
        return $this->getParam(self::P_PARAM_COLOUR);
103
    }
104
105
    /**
106
     * @param $value
107
     *
108
     * @return $this
109
     */
110 2
    public function setColour($value)
111
    {
112 2
        return $this->setParam(self::P_PARAM_COLOUR, $value);
113
    }
114
115
    /**
116
     * @return null
117
     */
118 2
    public function getFormat()
119
    {
120 2
        return $this->getParam(self::P_PARAM_FORMAT);
121
    }
122
123
    /**
124
     * @param $value
125
     *
126
     * @return $this
127
     */
128 2
    public function setFormat($value)
129
    {
130 2
        return $this->setParam(self::P_PARAM_FORMAT, $value);
131
    }
132
133
134
}