TNTSearch::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
crap 2
1
<?php
2
/**
3
 * @link https://github.com/vuongxuongminh/yii2-searchable
4
 * @copyright Copyright (c) 2019 Vuong Xuong Minh
5
 * @license [New BSD License](http://www.opensource.org/licenses/bsd-license.php)
6
 */
7
8
namespace vxm\searchable;
9
10
use Yii;
11
12
use yii\base\Configurable;
13
14
use TeamTNT\TNTSearch\TNTSearch as BaseTNTSearch;
15
16
/**
17
 * Class TNTSearch base on [[\TeamTNT\TNTSearch\TNTSearch]] implementing yii configurable.
18
 *
19
 * @author Vuong Minh <[email protected]>
20
 * @since 1.0.0
21
 */
22
class TNTSearch extends BaseTNTSearch implements Configurable
23
{
24
    /**
25
     * @inheritDoc
26
     */
27 12
    public function __construct(array $config = [])
28
    {
29 12
        if (!empty($config)) {
30 12
            Yii::configure($this, $config);
31
        }
32
33 12
        parent::__construct();
34 12
    }
35
36
}
37