Completed
Push — master ( db5281...ea0629 )
by Andrii
13:03
created

BoxController   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
c 1
b 0
f 0
lcom 1
cbo 0
dl 0
loc 31
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A init() 0 4 1
A options() 0 4 1
A getConfiguration() 0 4 1
A actionMake() 0 4 1
A actionBuild() 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
/**
15
 * Goal for Box.
16
 */
17
class BoxController extends \hidev\controllers\CommonController
18
{
19
    public $configFile = 'box.json';
20
21
    public function init()
22
    {
23
        $this->setDeps($this->configFile);
24
    }
25
26
    public function options($action)
27
    {
28
        return array_merge(parent::options($action), ['force', 'coverageText', 'coverageClover']);
29
    }
30
31
    public function getConfiguration()
32
    {
33
        return $this->config->get($this->configFile);
34
    }
35
36
    public function actionMake()
37
    {
38
        return $this->actionBuild();
39
    }
40
41
    public function actionBuild()
42
    {
43
        $args = ['build'];
44
45
        return $this->passthru('box', $args);
46
    }
47
}
48