Passed
Push — master ( a57761...826c30 )
by test
04:09
created

ApnsInfo::setSound()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

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 4
ccs 3
cts 3
cp 1
crap 1
rs 10
1
<?php
2
3
namespace EasyIM\TencentIM\Kernel\OfflinePushInfo;
4
5
use EasyIM\Kernel\Parameter;
6
7
/**
8
 * Class ApnsInfo
9
 *
10
 * @package EasyIM\TencentIM\Kernel\OfflinePushInfo
11
 * @author  longing <[email protected]>
12
 */
13
class ApnsInfo extends Parameter
14
{
15
    /**
16
     * @var string[]
17
     */
18
    protected $properties = [
19
        'Sound',
20
        'BadgeMode',
21
        'Title',
22
        'SubTitle',
23
        'Image'
24
    ];
25
26
27
    /**
28
     *
29
     * @param string $value
30
     *
31
     * @return $this
32
     */
33 2
    public function setSound(string $value)
34
    {
35 2
        $this->setAttribute('Sound', $value);
36 2
        return $this;
37
    }
38
39
    /**
40
     *
41
     * @param int $value
42
     *
43
     * @return $this
44
     */
45 2
    public function setBadgeMode(int $value)
46
    {
47 2
        $this->setAttribute('BadgeMode', $value);
48 2
        return $this;
49
    }
50
51
    /**
52
     *
53
     * @param string $value
54
     *
55
     * @return $this
56
     */
57 2
    public function setTitle(string $value)
58
    {
59 2
        $this->setAttribute('Title', $value);
60 2
        return $this;
61
    }
62
63
    /**
64
     *
65
     * @param string $value
66
     *
67
     * @return $this
68
     */
69 2
    public function setSubTitle(string $value)
70
    {
71 2
        $this->setAttribute('SubTitle', $value);
72 2
        return $this;
73
    }
74
75
    /**
76
     *
77
     * @param string $value
78
     *
79
     * @return $this
80
     */
81 2
    public function setImage(string $value)
82
    {
83 2
        $this->setAttribute('Image', $value);
84 2
        return $this;
85
    }
86
}
87