Completed
Push — master ( 27dc7b...6de725 )
by Andrii
05:04
created

ConfigCalculation   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 8
dl 0
loc 19
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A rules() 0 5 1
A init() 0 6 1
1
<?php
2
3
namespace hipanel\modules\server\cart;
4
5
use hipanel\base\ModelTrait;
6
use hipanel\modules\finance\cart\Calculation;
7
8
9
class ConfigCalculation extends Calculation
10
{
11
    use ModelTrait;
12
13
    /** {@inheritdoc} */
14
    public function init()
15
    {
16
        parent::init();
17
18
        $this->object = 'serverConfig';
0 ignored issues
show
Bug Best Practice introduced by
The property object does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
19
        $this->type = 'purchase';
0 ignored issues
show
Bug Best Practice introduced by
The property type does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
20
    }
21
22
    /** {@inheritdoc} */
23
    public function rules()
24
    {
25
        return array_merge(parent::rules(), [
26
            [['object_id'], 'integer'],
27
            [['location'], 'string'],
28
        ]);
29
    }
30
}
31