Message   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
dl 0
loc 33
rs 10
c 0
b 0
f 0
wmc 4
lcom 0
cbo 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 2
A setFace() 0 4 1
A getFace() 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\Request;
12
13
use Slince\SmartQQ\Message\Message as BaseMessage;
14
use Slince\SmartQQ\Message\Content;
15
use Slince\SmartQQ\Utils;
16
17
class Message extends BaseMessage
18
{
19
    /**
20
     * 具体不明.
21
     *
22
     * @var int
23
     */
24
    protected $face = 522;
25
26
    public function __construct($content)
27
    {
28
        if (is_string($content)) {
29
            $content = new Content($content);
30
        }
31
        parent::__construct($content, Utils::makeMsgId());
32
    }
33
34
    /**
35
     * @param int $face
36
     */
37
    public function setFace($face)
38
    {
39
        $this->face = $face;
40
    }
41
42
    /**
43
     * @return int
44
     */
45
    public function getFace()
46
    {
47
        return $this->face;
48
    }
49
}
50