Completed
Push — master ( 3bbe72...a1f8d5 )
by Carlos
05:23 queued 02:38
created

Material   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 1
c 2
b 0
f 1
lcom 0
cbo 1
dl 0
loc 21
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
3
/*
4
 * This file is part of the overtrue/wechat.
5
 *
6
 * (c) overtrue <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
/**
13
 * Material.php.
14
 *
15
 * @author    overtrue <[email protected]>
16
 * @copyright 2015 overtrue <[email protected]>
17
 *
18
 * @link      https://github.com/overtrue
19
 * @link      http://overtrue.me
20
 */
21
namespace EasyWeChat\Message;
22
23
/**
24
 * Class Material.
25
 */
26
class Material extends AbstractMessage
27
{
28
    /**
29
     * Properties.
30
     *
31
     * @var array
32
     */
33
    protected $properties = ['media_id'];
34
35
    /**
36
     * Material constructor.
37
     *
38
     * @param string $mediaId
39
     * @param string $type
40
     */
41 1
    public function __construct($type, $mediaId)
42
    {
43 1
        $this->set('media_id', $mediaId);
44 1
        $this->type = $type;
45 1
    }
46
}
47