MyComponentTest::behaviors()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
/**
3
 * @link https://github.com/yiiviet/yii2-n2w
4
 * @copyright Copyright (c) 2018 Yii Viet
5
 * @license [New BSD License](http://www.opensource.org/licenses/bsd-license.php)
6
 */
7
8
namespace yiiviet\tests\unit\n2w;
9
10
use yii\base\Component;
11
12
use yiiviet\n2w\Behavior as N2WBehavior;
13
14
/**
15
 * Lớp {MyComponentTest}
16
 *
17
 * @author Vuong Minh <[email protected]>
18
 * @since 1.0
19
 */
20
class MyComponentTest extends Component
21
{
22
    /**
23
     * @var int
24
     */
25
    public $number;
26
27
    /**
28
     * @var mixed
29
     */
30
    public $notNumber;
31
32
    /**
33
     * @inheritdoc
34
     */
35
    public function behaviors()
36
    {
37
        return [
38
            [
39
                'class' => N2WBehavior::class,
40
                'properties' => ['number', 'notNumber']
41
            ]
42
        ];
43
    }
44
45
46
}
47