Conditions | 1 |
Paths | 1 |
Total Lines | 7 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
41 | public function rules() |
||
42 | { |
||
43 | return array_merge(parent::rules(), [ |
||
44 | [['client_id', 'tariff_id', 'sale_time'], 'required'], |
||
45 | [['id', 'client_id', 'tariff_id'], 'integer', 'on' => 'sell'], |
||
46 | [['sale_time'], 'date', 'format' => 'php:Y-m-d H:i:s', 'on' => 'sell'], |
||
47 | [['move_accounts'], 'boolean', 'on' => ['sell']], |
||
48 | ]); |
||
51 |