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.
Completed
Push — master ( 20a803...a4a304 )
by Pavel
38:30
created

ItemRequired   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 34
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A tableName() 0 4 1
A behaviors() 0 9 1
A rules() 0 7 1
1
<?php
2
namespace tests;
3
4
use paulzi\jsonBehavior\JsonValidator;
5
use yii\db\ActiveRecord;
6
use paulzi\jsonBehavior\JsonField;
7
use paulzi\jsonBehavior\JsonBehavior;
8
9
/**
10
 * @property integer $id
11
 * @property JsonField $params
12
 *
13
 * @method static Item|null findOne($condition)
14
 * @method static Item[] findAll($condition)
15
 */
16
class ItemRequired extends ActiveRecord
17
{
18
    /**
19
     * @inheritdoc
20
     */
21
    public static function tableName()
22
    {
23
        return '{{%item}}';
24
    }
25
26
    /**
27
     * @inheritdoc
28
     */
29
    public function behaviors()
30
    {
31
        return [
32
            [
33
                'class'      => JsonBehavior::className(),
34
                'attributes' => ['params'],
35
            ]
36
        ];
37
    }
38
39
    /**
40
     * @inheritdoc
41
     */
42
    public function rules()
43
    {
44
        return [
45
            [['params'], 'required'],
46
            [['params'], JsonValidator::className()],
47
        ];
48
    }
49
}