Tag   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 34
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A tableName() 0 4 1
A rules() 0 8 1
A attributeLabels() 0 8 1
1
<?php
2
3
namespace zacksleo\yii2\cms\models;
4
5
use Yii;
6
7
/**
8
 * This is the model class for table "{{%tag}}".
9
 *
10
 * @property integer $id
11
 * @property string $name
12
 * @property integer $frequency
13
 */
14
class Tag extends \yii\db\ActiveRecord
15
{
16
    /**
17
     * @inheritdoc
18
     */
19 1
    public static function tableName()
20
    {
21 1
        return '{{%tag}}';
22
    }
23
24
    /**
25
     * @inheritdoc
26
     */
27 1
    public function rules()
28
    {
29
        return [
30 1
            [['name'], 'required'],
31 1
            [['frequency'], 'integer'],
32 1
            [['name'], 'string', 'max' => 255],
33 1
        ];
34
    }
35
36
    /**
37
     * @inheritdoc
38
     */
39 1
    public function attributeLabels()
40
    {
41
        return [
42 1
            'id' => 'ID',
43 1
            'name' => 'Name',
44 1
            'frequency' => 'Frequency',
45 1
        ];
46
    }
47
}
48