Completed
Pull Request — master (#632)
by mingyoung
02:45
created

Notice::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
ccs 0
cts 5
cp 0
crap 2
rs 9.4285
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
 * Notice.php.
14
 *
15
 * Part of Overtrue\WeChat.
16
 *
17
 * For the full copyright and license information, please view the LICENSE
18
 * file that was distributed with this source code.
19
 *
20
 * @author    mingyoung <[email protected]>
21
 * @copyright 2016
22
 *
23
 * @see      https://github.com/overtrue
24
 * @see      http://overtrue.me
25
 */
26
27
namespace EasyWeChat\MiniProgram\Notice;
28
29
use EasyWeChat\Notice\Notice as BaseNotice;
30
31
class Notice extends BaseNotice
32
{
33
    /**
34
     * {@inheritdoc}.
35
     */
36
    protected $message = [
37
        'touser' => '',
38
        'template_id' => '',
39
        'page' => '',
40
        'form_id' => '',
41
        'data' => [],
42
        'emphasis_keyword' => '',
43
    ];
44
45
    /**
46
     * {@inheritdoc}.
47
     */
48
    protected $defaults = [
49
        'touser' => '',
50
        'template_id' => '',
51
        'form_id' => '',
52
        'data' => [],
53
    ];
54
55
    /**
56
     * {@inheritdoc}.
57
     */
58
    protected $required = ['touser', 'template_id', 'form_id'];
59
60
    /**
61
     * Send notice message.
62
     */
63
    const API_SEND_NOTICE = 'https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send';
64
}
65