Update   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 19
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A init() 0 5 1
A afterRun() 0 4 1
1
<?php
2
3
namespace yiicod\systemparams\actions\backend;
4
5
use Yii;
6
use yii2mod\editable\EditableAction;
7
use yiicod\systemparams\SystemParamsService;
8
9
/**
10
 * Class UpdateAction
11
 *
12
 * @package yiicod\systemparams\actions\backend\systemParams
13
 */
14
class Update extends EditableAction
15
{
16
    /**
17
     * Init action
18
     */
19
    public function init()
20
    {
21
        $this->modelClass = Yii::$app->get('systemparams')->modelMap['systemParam']['class'];
22
        parent::init();
23
    }
24
25
    /**
26
     * After action runs
27
     */
28
    public function afterRun()
29
    {
30
        SystemParamsService::flushCache();
31
    }
32
}
33