Issues (3)

src/console/BoxController.php (1 issue)

Labels
Severity
1
<?php
2
/**
3
 * Box plugin for HiDev
4
 *
5
 * @link      https://github.com/hiqdev/hidev-box
6
 * @package   hidev-box
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2016-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hidev\box\console;
12
13
/**
14
 * PHAR building with Box.
15
 */
16
class BoxController extends \hidev\base\Controller
17
{
18
    protected $_before = ['install', 'box.json'];
19
20
    public $verbose;
21
22
    public function getConfiguration()
23
    {
24
        return $this->take('box.json');
25
    }
26
27
    public function actionIndex()
28
    {
29
        $this->take('vcs')->setIgnore([
30
            $this->getConfiguration()->get('output') => 'Binaries',
31
        ]);
32
        /// TODO fix to use general vcsignore
33
        $this->runRequest('.gitignore');
0 ignored issues
show
The method runRequest() does not exist on hidev\box\console\BoxController. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

33
        $this->/** @scrutinizer ignore-call */ 
34
               runRequest('.gitignore');
Loading history...
34
35
        return $this->runBuild();
36
    }
37
38
    public function actionBuild()
39
    {
40
        $this->runBuild();
41
    }
42
43
    public function runBuild()
44
    {
45
        $args = ['build'];
46
        if ($this->verbose) {
47
            $args[] = '--verbose';
48
        }
49
50
        return $this->passthru('box', $args);
51
    }
52
}
53