Completed
Push — master ( b415f5...05f0c6 )
by Dmitry
05:23
created

CalculateValueCommand::load()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 12

Importance

Changes 0
Metric Value
dl 0
loc 13
ccs 0
cts 5
cp 0
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 8
nc 2
nop 2
crap 12
1
<?php
2
3
namespace hiqdev\billing\hiapi\commands\order;
4
5
use hiapi\commands\BaseCommand;
6
use hiapi\validators\NestedModelValidator;
7
8
class CalculateValueCommand extends BaseCommand
9
{
10
    public $items;
11
12
    public function rules()
13
    {
14
        return [
15
            ['items', 'required'],
16
            ['items', 'each', 'rule' => [NestedModelValidator::class, 'modelClass' => ActionDto::class]],
17
        ];
18
    }
19
}
20