TargetDto   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 8
c 1
b 0
f 0
dl 0
loc 18
ccs 0
cts 11
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A load() 0 3 1
A rules() 0 6 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 yii\base\Model;
14
15
class TargetDto extends Model
16
{
17
    public $id;
18
19
    public $type;
20
21
    public function rules()
22
    {
23
        return [
24
            [['id', 'type'], 'required'],
25
            [['id'], 'integer'],
26
            [['type'], 'string'],
27
        ];
28
    }
29
30
    public function load($data, $formName = '')
31
    {
32
        return parent::load($data, $formName);
33
    }
34
}
35