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

BoxController::actionBuild()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4286
cc 1
eloc 3
nc 1
nop 0
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