GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

PostAbridge::behaviors()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 18
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 18
rs 9.4285
cc 1
eloc 12
nc 1
nop 0
1
<?php
2
3
namespace tests\models;
4
5
use \omgdef\multilingual\MultilingualBehavior;
6
use \omgdef\multilingual\MultilingualQuery;
7
8
/**
9
 * Post
10
 *
11
 * @property integer $id
12
 * @property string $title
13
 * @property string $body
14
 *
15
 */
16
class PostAbridge extends \yii\db\ActiveRecord
17
{
18
    /**
19
     * @inheritdoc
20
     */
21
    public static function tableName()
22
    {
23
        return 'post';
24
    }
25
26
    /**
27
     * @inheritdoc
28
     */
29
    public function behaviors()
30
    {
31
        return [
32
            'ml' => [
33
                'class' => MultilingualBehavior::className(),
34
                'languages' => [
35
                    'ru' => 'Russian',
36
                    'en-US' => 'English',
37
                ],
38
                'defaultLanguage' => 'ru',
39
                'langForeignKey' => 'post_id',
40
                'tableName' => "{{%postLang}}",
41
                'attributes' => [
42
                    'title', 'body',
43
                ]
44
            ],
45
        ];
46
    }
47
48
    /**
49
     * @inheritdoc
50
     */
51
    public function rules()
52
    {
53
        return [
54
            [['title', 'body'], 'required'],
55
            ['title', 'string'],
56
        ];
57
    }
58
59
    /**
60
     * @inheritdoc
61
     */
62
    public function transactions()
63
    {
64
        return [
65
            self::SCENARIO_DEFAULT => self::OP_ALL,
66
        ];
67
    }
68
69
    /**
70
     * @inheritdoc
71
     */
72
    public static function find()
73
    {
74
        return new MultilingualQuery(get_called_class());
75
    }
76
}