File   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 15
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A rules() 0 10 1
1
<?php
2
/**
3
 * HiPanel core package
4
 *
5
 * @link      https://hipanel.com/
6
 * @package   hipanel-core
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hipanel\models;
12
13
use hipanel\base\ModelTrait;
14
15
/**
16
 * Class File.
17
 *
18
 * @property string type
19
 */
20
class File extends \hiqdev\hiart\ActiveRecord
21
{
22
    use ModelTrait;
23
24
    public function rules()
25
    {
26
        return [
27
            [['id', 'type_id', 'state_id', 'client_id', 'seller_id', 'object_id', 'size'], 'integer'],
28
            [['filename', 'md5', 'type', 'state', 'client', 'seller'], 'safe'],
29
            [['create_time', 'update_time', 'month'], 'safe'],
30
31
            [['url', 'filename'], 'string', 'on' => ['put']],
32
        ];
33
    }
34
}
35