Music   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 37
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A thumb() 0 6 1
1
<?php
2
3
namespace YEntWeChat\Message;
4
5
/**
6
 * Class Music.
7
 *
8
 * @property string $url
9
 * @property string $hq_url
10
 * @property string $title
11
 * @property string $description
12
 * @property string $thumb_media_id
13
 * @property string $format
14
 */
15
class Music extends AbstractMessage
16
{
17
    /**
18
     * Message type.
19
     *
20
     * @var string
21
     */
22
    protected $type = 'music';
23
24
    /**
25
     * Properties.
26
     *
27
     * @var array
28
     */
29
    protected $properties = [
30
        'title',
31
        'description',
32
        'url',
33
        'hq_url',
34
        'thumb_media_id',
35
        'format',
36
    ];
37
38
    /**
39
     * 设置视频封面.
40
     *
41
     * @param string $mediaId
42
     *
43
     * @return Video
44
     */
45
    public function thumb($mediaId)
46
    {
47
        $this->setAttribute('thumb_media_id', $mediaId);
48
49
        return $this;
50
    }
51
}
52