Passed
Push — master ( ebb653...69cfe7 )
by Andrii
12:58
created

SaleCloseCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 14
c 1
b 0
f 0
dl 0
loc 27
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A rules() 0 11 1
1
<?php
2
3
namespace hiqdev\billing\hiapi\sale\Close;
4
5
use hiapi\commands\BaseCommand;
6
use hiapi\validators\IdValidator;
7
8
class SaleCloseCommand extends BaseCommand
9
{
10
    public $customer_id;
11
12
    public $plan_id;
13
14
    public $target_id;
15
16
    public $time;
17
18
    public $customer;
19
20
    public $plan;
21
22
    public $target;
23
24
    public function rules()
25
    {
26
        return [
27
            [['customer_id'], IdValidator::class],
28
29
            [['plan_id'], IdValidator::class],
30
31
            [['target_id'], IdValidator::class],
32
            [['target_id'], 'required'],
33
34
            [['time'], 'datetime'],
35
        ];
36
    }
37
}
38