FriendMessage::setToUin()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
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 FriendMessage extends Message
16
{
17
    /**
18
     * 接收用户编号,也是QQ号.
19
     *
20
     * @var int
21
     */
22
    protected $toUin;
23
24
    /**
25
     * 发信用户编号,非QQ号.
26
     *
27
     * @var int
28
     */
29
    protected $fromUin;
30
31
    public function __construct($toUin, $fromUin, Content $content, $time, $msgId = 0, $msgType = 0)
32
    {
33
        $this->toUin = $toUin;
34
        $this->fromUin = $fromUin;
35
        parent::__construct($content, $time, $msgId, $msgType);
36
    }
37
38
    /**
39
     * @param int $toUin
40
     */
41
    public function setToUin($toUin)
42
    {
43
        $this->toUin = $toUin;
44
    }
45
46
    /**
47
     * @param int $fromUin
48
     */
49
    public function setFromUin($fromUin)
50
    {
51
        $this->fromUin = $fromUin;
52
    }
53
54
    /**
55
     * @return int
56
     */
57
    public function getToUin()
58
    {
59
        return $this->toUin;
60
    }
61
62
    /**
63
     * @return int
64
     */
65
    public function getFromUin()
66
    {
67
        return $this->fromUin;
68
    }
69
}
70