DiscussMessage   A
last analyzed

Complexity

Total Complexity 9

Size/Duplication

Total Lines 104
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 104
rs 10
c 0
b 0
f 0
wmc 9
lcom 0
cbo 1

9 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A setToUin() 0 4 1
A setFromUin() 0 4 1
A setDiscussId() 0 4 1
A setSendUin() 0 4 1
A getToUin() 0 4 1
A getFromUin() 0 4 1
A getDiscussId() 0 4 1
A getSendUin() 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\Message\Response;
12
13
use Slince\SmartQQ\Message\Content;
14
15
class DiscussMessage extends Message
16
{
17
    /**
18
     * 接收用户编号,也是QQ号.
19
     *
20
     * @var int
21
     */
22
    protected $toUin;
23
24
    /**
25
     * 讨论组编号.
26
     *
27
     * @var int
28
     */
29
    protected $fromUin;
30
31
    /**
32
     * 讨论组编号,同fromUin
33
     * PS: 对应影响中的did.
34
     *
35
     * @var int
36
     */
37
    protected $discussId;
38
39
    /**
40
     * 发信用户编号,非QQ号.
41
     *
42
     * @var int
43
     */
44
    protected $sendUin;
45
46
    public function __construct($toUin, $fromUin, $discussId, $sendUin, Content $content, $time, $msgId = 0, $msgType = 0)
47
    {
48
        $this->toUin = $toUin;
49
        $this->fromUin = $fromUin;
50
        $this->discussId = $discussId;
51
        $this->sendUin = $sendUin;
52
        parent::__construct($content, $time, $msgId, $msgType);
53
    }
54
55
    /**
56
     * @param int $toUin
57
     */
58
    public function setToUin($toUin)
59
    {
60
        $this->toUin = $toUin;
61
    }
62
63
    /**
64
     * @param int $fromUin
65
     */
66
    public function setFromUin($fromUin)
67
    {
68
        $this->fromUin = $fromUin;
69
    }
70
71
    /**
72
     * @param int $discussId
73
     */
74
    public function setDiscussId($discussId)
75
    {
76
        $this->discussId = $discussId;
77
    }
78
79
    /**
80
     * @param int $sendUin
81
     */
82
    public function setSendUin($sendUin)
83
    {
84
        $this->sendUin = $sendUin;
85
    }
86
87
    /**
88
     * @return int
89
     */
90
    public function getToUin()
91
    {
92
        return $this->toUin;
93
    }
94
95
    /**
96
     * @return int
97
     */
98
    public function getFromUin()
99
    {
100
        return $this->fromUin;
101
    }
102
103
    /**
104
     * @return int
105
     */
106
    public function getDiscussId()
107
    {
108
        return $this->discussId;
109
    }
110
111
    /**
112
     * @return int
113
     */
114
    public function getSendUin()
115
    {
116
        return $this->sendUin;
117
    }
118
}
119