Plan   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
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 16
ccs 0
cts 13
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A relations() 0 5 1
A attributes() 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\models;
12
13
use hiqdev\yii\DataMapper\models\AbstractModel;
14
use hiqdev\yii\DataMapper\query\attributes\BooleanAttribute;
15
use hiqdev\yii\DataMapper\query\attributes\IntegerAttribute;
16
use hiqdev\yii\DataMapper\query\attributes\StringAttribute;
17
18
class Plan extends AbstractModel
19
{
20
    public function attributes()
21
    {
22
        return [
23
            'id'          => IntegerAttribute::class,
24
            'name'        => StringAttribute::class,
25
            'is_grouping' => BooleanAttribute::class,
26
        ];
27
    }
28
29
    public function relations()
30
    {
31
        return [
32
            'type' => Type::class,
33
            'seller' => Customer::class,
34
        ];
35
    }
36
}
37