AddFriendParameter   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 74
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 18
c 0
b 0
f 0
dl 0
loc 74
ccs 0
cts 24
cp 0
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setAddSource() 0 4 1
A setToAccount() 0 4 1
A setAddWording() 0 4 1
A setRemark() 0 4 1
A setGroupName() 0 4 1
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