Completed
Push — master ( 17e3a2...711227 )
by Andrii
03:12
created

BoxJsonController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 3
Bugs 1 Features 0
Metric Value
wmc 1
c 3
b 1
f 0
lcom 1
cbo 3
dl 0
loc 11
ccs 0
cts 4
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A actionSave() 0 6 1
1
<?php
2
3
/*
4
 * Box plugin for HiDev
5
 *
6
 * @link      https://github.com/hiqdev/hidev-box
7
 * @package   hidev-box
8
 * @license   BSD-3-Clause
9
 * @copyright Copyright (c) 2016, HiQDev (http://hiqdev.com/)
10
 */
11
12
namespace hidev\box\controllers;
13
14
use hidev\helpers\Helper;
15
16
/**
17
 * Goal for box.json config file.
18
 */
19
class BoxJsonController extends \hidev\controllers\FileController
20
{
21
    protected $_file = 'box.json';
22
23
    public function actionSave()
24
    {
25
        $this->_items = Helper::uniqueConfig($this->_items);
26
        $this->getFile()->save($this->getItems());
27
        return 0;
28
    }
29
}
30