BannerTranslation   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 18
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A tableName() 0 4 1
A getBanner() 0 4 1
1
<?php
2
/**
3
 * @link https://github.com/yiimaker/yii2-banner
4
 * @copyright Copyright (c) 2017 Yii Maker
5
 * @license BSD 3-Clause License
6
 */
7
8
namespace ymaker\banner\common\models\entities;
9
10
use yii\db\ActiveRecord;
11
12
/**
13
 * This is the model class for table "{{%banner_translation}}".
14
 *
15
 * @property int $id
16
 * @property int $banner_id
17
 * @property string $language
18
 * @property string $content
19
 * @property string $hint
20
 * @property string $file_name
21
 * @property string $alt
22
 * @property string $link
23
 *
24
 * @property Banner $banner
25
 *
26
 * @author Vladimir Kuprienko <[email protected]>
27
 * @since 1.0
28
 */
29
class BannerTranslation extends ActiveRecord
30
{
31
    /**
32
     * @inheritdoc
33
     */
34
    public static function tableName()
35
    {
36
        return '{{%banner_translation}}';
37
    }
38
39
    /**
40
     * @return \yii\db\ActiveQuery
41
     */
42
    public function getBanner()
43
    {
44
        return $this->hasOne(Banner::class, ['id' => 'banner_id']);
45
    }
46
}
47