Conditions | 1 |
Paths | 1 |
Total Lines | 7 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
33 | public function rules() |
||
34 | { |
||
35 | return array_merge(parent::rules(), [ |
||
36 | [['client_id', 'tariff_id', 'sale_time'], 'required'], |
||
37 | [['id', 'client_id', 'tariff_id'], 'integer', 'on' => 'sell'], |
||
38 | [['sale_time'], 'date', 'format' => 'php:Y-m-d H:i:s', 'on' => 'sell'], |
||
39 | [['move_accounts'], 'boolean', 'on' => ['sell']], |
||
40 | ]); |
||
44 |