Completed
Push — master ( 0daec9...07eda8 )
by Paweł
02:54
created

AccountStats::fields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created for IG Monitoring.
4
 * User: jakim <[email protected]>
5
 * Date: 15.05.2018
6
 */
7
8
namespace app\modules\api\v1\models;
9
10
11
use yii\behaviors\AttributeTypecastBehavior;
12
use yii\helpers\ArrayHelper;
13
14
class AccountStats extends \app\models\AccountStats
15
{
16
    public function behaviors()
17
    {
18
        return ArrayHelper::merge(parent::behaviors(), [
19
            'type' => [
20
                'class' => AttributeTypecastBehavior::class,
21
                'typecastAfterValidate' => false,
22
                'typecastAfterSave' => true,
23
                'typecastAfterFind' => true,
24
            ],
25
        ]);
26
    }
27
28
    public function fields()
29
    {
30
        return [
31
            'followed_by',
32
            'follows',
33
            'media',
34
            'er',
35
            'created_at',
36
        ];
37
    }
38
}