Code Duplication    Length = 12-13 lines in 2 locations

src/models/Change.php 1 location

@@ 30-41 (lines=12) @@
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function rules()
31
    {
32
        return [
33
            [['id', 'seller_id', 'client_id'], 'integer'],
34
            [['client', 'seller', 'type'], 'safe'],
35
            [['state', 'class', 'time'], 'safe'],
36
            [['client', 'seller', 'type'], 'safe'],
37
            [['user_comment', 'tech_comment', 'finish_time'], 'safe'],
38
            [['params'], 'safe'],
39
            [['id', 'comment'], 'required', 'on' => ['approve', 'reject']],
40
        ];
41
    }
42
43
    public static function find()
44
    {

src/models/Tariff.php 1 location

@@ 30-42 (lines=13) @@
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function rules()
31
    {
32
        return [
33
            [['client_id', 'seller_id', 'id'],      'integer'],
34
            [['client', 'seller', 'bill', 'name'],  'safe'],
35
            [['domain', 'server'],                  'safe'],
36
            [['tariff', 'tariff_id'],               'safe'],
37
            [['type_id', 'state_id'],               'integer'],
38
            [['type', 'state'],                     'safe'],
39
            [['used'],                              'integer'],
40
            [['note', 'label'],                     'safe'],
41
        ];
42
    }
43
44
    public function getResources()
45
    {