Money::relations()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 3
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
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
/**
18
 * Class Quantity.
19
 *
20
 * @author Dmytro Naumenko <[email protected]>
21
 */
22
class Money extends AbstractModel
23
{
24
    public function attributes()
25
    {
26
        return [
27
            'amount' => IntegerAttribute::class,
28
            'currency' => StringAttribute::class, // todo: regexp validatior
29
        ];
30
    }
31
32
    public function relations()
33
    {
34
        return [];
35
    }
36
}
37