Total Complexity | 5 |
Total Lines | 55 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
11 | class SetState extends RequestMethods |
||
12 | { |
||
13 | const OFFLINE = 0; |
||
14 | const ONLINE = 1; |
||
15 | const AWAY = 2; |
||
16 | const BUSY = 3; |
||
17 | |||
18 | /** |
||
19 | * State: |
||
20 | * 0 "offline" offline |
||
21 | * 1 "online" online |
||
22 | * 2 "away" absent (can receive calls, but shan't receive messages) |
||
23 | * 3 "busy" busy (can receive messages, but shan’t receive calls). |
||
24 | * |
||
25 | * @var int |
||
26 | */ |
||
27 | public $state = -1; |
||
28 | public $termid; |
||
29 | public $note; |
||
30 | |||
31 | /** |
||
32 | * Set state online. |
||
33 | */ |
||
34 | 1 | public function online() |
|
35 | { |
||
36 | 1 | $this->state = self::ONLINE; |
|
37 | 1 | } |
|
38 | |||
39 | /** |
||
40 | * Set state offline. |
||
41 | */ |
||
42 | 1 | public function offline() |
|
45 | 1 | } |
|
46 | |||
47 | /** |
||
48 | * Set state away. |
||
49 | */ |
||
50 | 1 | public function away() |
|
51 | { |
||
52 | 1 | $this->state = self::AWAY; |
|
53 | 1 | } |
|
54 | |||
55 | /** |
||
56 | * Set state busy. |
||
57 | */ |
||
58 | 1 | public function busy() |
|
59 | { |
||
60 | 1 | $this->state = self::BUSY; |
|
61 | 1 | } |
|
62 | |||
63 | 1 | public function getMandatoryFields(): array |
|
66 | } |
||
67 | } |
||
68 |