Tag::tableName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
cc 1
nc 1
nop 0
crap 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