Completed
Pull Request — master (#292)
by Carlos
05:19 queued 02:03
created

Raw::__construct()   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
c 1
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
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
 * Raw.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 Raw.
25
 */
26
class Raw extends AbstractMessage
27
{
28
    /**
29
     * @var string
30
     */
31
    protected $type = 'raw';
32
33
    /**
34
     * Properties.
35
     *
36
     * @var array
37
     */
38
    protected $properties = ['content'];
39
40
    /**
41
     * Constructor.
42
     *
43
     * @param array $content
44
     */
45 2
    public function __construct($content)
46
    {
47 2
        parent::__construct(['content' => strval($content)]);
48 2
    }
49
}
50