CalculateValueCommand   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
c 3
b 0
f 0
dl 0
loc 9
ccs 0
cts 5
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A rules() 0 5 1
1
<?php
2
/**
3
 * API for Billing
4
 *
5
 * @link      https://github.com/hiqdev/billing-hiapi
6
 * @package   billing-hiapi
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2017-2018, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\billing\hiapi\commands\order;
12
13
use hiapi\commands\BaseCommand;
14
use hiqdev\yii\DataMapper\validators\NestedModelValidator;
15
16
class CalculateValueCommand extends BaseCommand
17
{
18
    public $items;
19
20
    public function rules()
21
    {
22
        return [
23
            ['items', 'required'],
24
            ['items', 'each', 'rule' => [NestedModelValidator::class, 'modelClass' => ActionDto::class]],
25
        ];
26
    }
27
}
28