ActiveRecord   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 10
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A index() 0 4 1
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