UpdateFriendParameter   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 9
c 2
b 0
f 0
dl 0
loc 26
ccs 0
cts 9
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setSnsItem() 0 4 1
A setToAccount() 0 5 1
1
<?php
2
3
namespace EasyIM\TencentIM\Sns\Parameter;
4
5
use EasyIM\Kernel\Parameter;
6
use EasyIM\TencentIM\Kernel\Parameter\TagParameter;
7
8
/**
9
 * Class UpdateFriendParameter
10
 *
11
 * @package EasyIM\TencentIM\Sns\Parameter
12
 * @author  longing <[email protected]>
13
 */
14
class UpdateFriendParameter extends Parameter
15
{
16
    protected $properties = [
17
        'To_Account',
18
        'SnsItem'
19
    ];
20
21
    protected $required = ['To_Account', 'SnsItem'];
22
23
    /**
24
     *
25
     * @param TagParameter ...$tagParameters
26
     *
27
     * @return $this
28
     */
29
    public function setSnsItem(TagParameter ...$tagParameters)
30
    {
31
        $this->setAttribute('SnsItem', parameterList(...$tagParameters)());
32
        return $this;
33
    }
34
35
    public function setToAccount(string $account)
36
    {
37
        $this->setAttribute('To_Account', $account);
38
39
        return $this;
40
    }
41
}
42