Completed
Push — master ( 0e490c...4b4ef3 )
by Dmitry
11:06
created

VdsTariffManager::update()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 12
ccs 0
cts 10
cp 0
rs 9.8666
cc 2
nc 2
nop 0
crap 6
1
<?php
2
/**
3
 * Finance module for HiPanel
4
 *
5
 * @link      https://github.com/hiqdev/hipanel-module-finance
6
 * @package   hipanel-module-finance
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hipanel\modules\finance\logic;
12
13
use hipanel\modules\finance\forms\VdsTariffForm;
14
use hipanel\modules\finance\models\Tariff;
15
use hiqdev\hiart\ResponseErrorException;
16
use Yii;
17
use yii\web\NotFoundHttpException;
18
use yii\web\UnprocessableEntityHttpException;
19
20
abstract class VdsTariffManager extends AbstractTariffManager
21
{
22
    /**
23
     * @var VdsTariffForm
24
     */
25
    public $form;
26
27
    public function init()
28
    {
29
        if (!Yii::getAlias('@server', true)) {
30
            throw new NotFoundHttpException('Server module is missing');
31
        }
32
33
        parent::init();
34
    }
35
}
36