Statistic::rules()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 12
ccs 0
cts 9
cp 0
rs 9.8666
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * HiPanel tickets module
4
 *
5
 * @link      https://github.com/hiqdev/hipanel-module-ticket
6
 * @package   hipanel-module-ticket
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hipanel\modules\ticket\models;
12
13
use Yii;
14
15
class Statistic extends Thread
16
{
17
18
    use \hipanel\base\ModelTrait;
19
20
    public static $i18nDictionary = 'hipanel:ticket';
21
22
    public static function tableName()
23
    {
24
        return 'threadstatistic';
25
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function rules()
31
    {
32
        return [
33
            [['author_id', 'responsible_id', 'recipient_id', 'client_id', 'id', 'author_seller_id', 'replier_id', 'seller_id', 'client_seller_id'], 'integer'],
34
            [['topics', 'state', 'priority', 'watchers','author_seller', 'replier', 'state_label', 'login'], 'safe'],
35
            [['spent', 'spent_hours', 'spend'], 'safe'],
36
            [['author','watchers','responsible','recipient', 'anytext_like', 'seller', 'client'], 'safe'],
37
            [['author_email'], 'email'],
38
            [['create_time','lastanswer','subject', 'reply_time','time_from','time_till', 'thread_ids'], 'safe'],
39
            [['answer_count'], 'integer'],
40
        ];
41
    }
42
}
43