Completed
Push — master ( 65052d...e6fef9 )
by Dmitry
03:42
created

Bill   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 22
ccs 0
cts 11
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A attributes() 0 8 1
A relations() 0 10 1
1
<?php
2
3
namespace hiqdev\billing\hiapi\models;
4
5
use hiapi\query\types\IntegerAttribute;
6
use hiapi\query\types\StringAttribute;
7
8
class Bill extends AbstractModel
9
{
10
    public function attributes()
11
    {
12
        return [
13
            'id' => IntegerAttribute::class,
14
            'name' => StringAttribute::class,
15
            'time' => StringAttribute::class, // todo: change to time
16
        ];
17
    }
18
19
    public function relations()
20
    {
21
        return [
22
            'quantity' => Quantity::class,
23
            'sum' => Money::class,
24
            'type' => Type::class,
25
            'customer' => Customer::class,
26
            'target' => Target::class,
27
        ];
28
    }
29
}
30