ActiveRecord::index()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 *
4
 * @author Mihkel Viilveer <[email protected]>
5
 * @date 5.09.2014
6
 */
7
8
namespace opus\elastic\components;
9
10
/**
11
 * Class ActiveRecord
12
 *
13
 * @author Mihkel Viilveer <[email protected]>
14
 * @package opus\elastic\components
15
 */
16
class ActiveRecord extends \yii\elasticsearch\ActiveRecord
17
{
18
    /**
19
     * @return string the name of the index this record is stored in.
20
     */
21
    public static function index()
22
    {
23
        return \Yii::$app->get('elasticsearch')->index;
24
    }
25
}
26