Action::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
nc 1
nop 3
dl 0
loc 5
rs 9.4285
c 1
b 0
f 0
1
<?php
2
3
namespace LineMob\Core\Template;
4
5
/*
6
 * This file is part of the LineMob package.
7
 *
8
 * (c) Ishmael Doss <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
/**
15
 * @author YokYukYik <[email protected]>
16
 */
17
class Action
18
{
19
    const TYPE_MESSAGE = 'message';
20
    const TYPE_URI = 'uri';
21
    const TYPE_POSTBACK = 'postback';
22
23
    /**
24
     * @var string
25
     */
26
    public $label;
27
28
    /**
29
     * @var string
30
     */
31
    public $value;
32
33
    /**
34
     * @var string
35
     */
36
    public $type;
37
38
    /**
39
     * @param $label
40
     * @param $value
41
     * @param string $type
42
     */
43
    public function __construct($label, $value, $type = self::TYPE_MESSAGE)
44
    {
45
        $this->label = $label;
46
        $this->value = $value;
47
        $this->type = $type;
48
    }
49
}
50