AddFriendParameter::setAddSource()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 4
ccs 0
cts 4
cp 0
crap 2
rs 10
1
<?php
2
3
namespace EasyIM\TencentIM\Sns\Parameter;
4
5
use EasyIM\Kernel\Parameter;
6
7
/**
8
 * Class AddFriendParameter
9
 *
10
 * @package EasyIM\TencentIM\Sns\Parameter
11
 * @author  longing <[email protected]>
12
 */
13
class AddFriendParameter extends Parameter
14
{
15
    /**
16
     * @var array
17
     */
18
    protected $properties = [
19
        'To_Account',
20
        'Remark',
21
        'GroupName',
22
        'AddSource',
23
        'AddWording'
24
    ];
25
26
    protected $required = ['AddSource', 'To_Account'];
27
28
29
    /**
30
     *
31
     * @param string $value
32
     *
33
     * @return $this
34
     */
35
    public function setToAccount(string $value)
36
    {
37
        $this->setAttribute('To_Account', $value);
38
        return $this;
39
    }
40
41
    /**
42
     *
43
     * @param string $value
44
     *
45
     * @return $this
46
     */
47
    public function setRemark(string $value)
48
    {
49
        $this->setAttribute('Remark', $value);
50
        return $this;
51
    }
52
53
    /**
54
     *
55
     * @param mixed $value
56
     *
57
     * @return $this
58
     */
59
    public function setGroupName($value)
60
    {
61
        $this->setAttribute('GroupName', $value);
62
        return $this;
63
    }
64
65
    /**
66
     *
67
     * @param string $value
68
     *
69
     * @return $this
70
     */
71
    public function setAddSource(string $value)
72
    {
73
        $this->setAttribute('AddSource', $value);
74
        return $this;
75
    }
76
77
    /**
78
     *
79
     * @param string $value
80
     *
81
     * @return $this
82
     */
83
    public function setAddWording(string $value)
84
    {
85
        $this->setAttribute('AddWording', $value);
86
        return $this;
87
    }
88
}
89