CommonParameter::setValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
ccs 0
cts 4
cp 0
crap 2
rs 10
1
<?php
2
3
namespace EasyIM\TencentIM\Group\Parameter\Base;
4
5
use EasyIM\Kernel\Parameter;
6
7
/**
8
 * Class CommonParameter
9
 *
10
 * @package EasyIM\TencentIM\Group\Parameter\Base
11
 * @author  yingzhan <[email protected]>
12
 *
13
 */
14
class CommonParameter extends Parameter
15
{
16
    /**
17
     * @var array
18
     */
19
    protected $properties = [
20
        'Key',
21
        'Value'
22
    ];
23
24
    protected $required = ['Key', 'Value'];
25
26
    /**
27
     *
28
     * @param string $value
29
     *
30
     * @return $this
31
     */
32
    public function setKey(string $value)
33
    {
34
        $this->setAttribute('Key', $value);
35
36
        return $this;
37
    }
38
39
    /**
40
     *
41
     * @param string $value
42
     *
43
     * @return $this
44
     */
45
    public function setValue(string $value)
46
    {
47
        $this->setAttribute('Value', $value);
48
49
        return $this;
50
    }
51
}
52