OnlineStatus   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 89
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 89
rs 10
c 0
b 0
f 0
wmc 7
lcom 0
cbo 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getUin() 0 4 1
A setUin() 0 4 1
A __toString() 0 4 1
A setStatus() 0 4 1
A getStatus() 0 4 1
A getClientType() 0 4 1
A setClientType() 0 4 1
1
<?php
2
/*
3
 * This file is part of the slince/smartqq package.
4
 *
5
 * (c) Slince <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Slince\SmartQQ\Entity;
12
13
class OnlineStatus
14
{
15
    /**
16
     * @var string
17
     */
18
    const ONLINE = 'online';
19
20
    /**
21
     * @var string
22
     */
23
    const OFFLINE = 'offline';
24
25
    /**
26
     * 在线类型.
27
     *
28
     * @var int
29
     */
30
    protected $clientType;
31
32
    /**
33
     * 用户编号.
34
     *
35
     * @var int
36
     */
37
    protected $uin;
38
39
    /**
40
     * busy,away,online.
41
     *
42
     * @var string
43
     */
44
    protected $status;
45
46
    /**
47
     * @return int
48
     */
49
    public function getUin()
50
    {
51
        return $this->uin;
52
    }
53
54
    /**
55
     * @param int $uin
56
     */
57
    public function setUin($uin)
58
    {
59
        $this->uin = $uin;
60
    }
61
62
    /**
63
     * 转换为字符串.
64
     */
65
    public function __toString()
66
    {
67
        return $this->status;
68
    }
69
70
    /**
71
     * @param string $status
72
     */
73
    public function setStatus($status)
74
    {
75
        $this->status = $status;
76
    }
77
78
    /**
79
     * @return string
80
     */
81
    public function getStatus()
82
    {
83
        return $this->status;
84
    }
85
86
    /**
87
     * @return int
88
     */
89
    public function getClientType()
90
    {
91
        return $this->clientType;
92
    }
93
94
    /**
95
     * @param int $clientType
96
     */
97
    public function setClientType($clientType)
98
    {
99
        $this->clientType = $clientType;
100
    }
101
}
102