Completed
Push — master ( 3bd96a...d26825 )
by Klochok
12:58
created

Address::rules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace hipanel\modules\hosting\models;
4
5
use hipanel\base\ModelTrait;
6
use hipanel\modules\hosting\models\query\AddressQuery;
7
use hipanel\modules\hosting\models\query\PrefixQuery;
8
use Yii;
9
use yii\db\QueryInterface;
10
11
class Address extends Prefix
12
{
13
    use ModelTrait;
14
15
    public static function tableName()
16
    {
17
        return 'prefix';
18
    }
19
20
    /** {@inheritdoc} */
21
    public function rules()
22
    {
23
        return parent::rules();
24
    }
25
26
    /** {@inheritdoc} */
27
    public function attributeLabels()
28
    {
29
        return array_merge(parent::attributeLabels(), [
30
            'ip' => Yii::t('hipanel.hosting.ipam', 'Address'),
31
        ]);
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     * @return PrefixQuery
37
     */
38
    public static function find(array $options = []): QueryInterface
39
    {
40
        return new AddressQuery(get_called_class(), [
41
            'options' => $options,
42
        ]);
43
    }
44
}
45