Voice   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A media() 0 6 1
1
<?php
2
3
namespace EntWeChat\Message;
4
5
/**
6
 * Class Voice.
7
 *
8
 * @property string $media_id
9
 */
10
class Voice extends AbstractMessage
11
{
12
    /**
13
     * Message type.
14
     *
15
     * @var string
16
     */
17
    protected $type = 'voice';
18
19
    /**
20
     * Properties.
21
     *
22
     * @var array
23
     */
24
    protected $properties = [
25
        'media_id',
26
        'recognition',
27
    ];
28
29
    /**
30
     * Set media id.
31
     *
32
     * @param string $mediaId
33
     *
34
     * @return Voice
35
     */
36
    public function media($mediaId)
37
    {
38
        $this->setAttribute('media_id', $mediaId);
39
40
        return $this;
41
    }
42
}
43