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

Material::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
crap 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