Charge   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A attributes() 0 4 1
A relations() 0 11 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\models;
12
13
use hiqdev\yii\DataMapper\models\AbstractModel;
14
use hiqdev\yii\DataMapper\query\attributes\IntegerAttribute;
15
use hiqdev\yii\DataMapper\query\attributes\StringAttribute;
16
17
class Charge extends AbstractModel
18
{
19
    public function attributes()
20
    {
21
        return [
22
            'id'        => IntegerAttribute::class,
23
        ];
24
    }
25
26
    public function relations()
27
    {
28
        return [
29
            'type'      => Type::class,
30
            'target'    => Target::class,
31
            'action'    => Action::class,
32
            'price'     => Price::class,
33
            'usage'     => Quantity::class,
34
            'sum'       => Money::class,
35
            'bill'      => Bill::class,
36
            'parent'    => self::class,
37
        ];
38
    }
39
}
40