Issues (213)

src/cart/ConfigCalculation.php (2 issues)

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 Andrey Klochok
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 = 'estimate';
0 ignored issues
show
Bug Best Practice introduced by Andrey Klochok
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
            [['image'], 'string'],
29
        ]);
30
    }
31
}
32