Completed
Push — master ( 5a6ead...22a57d )
by Andrii
11:44
created

DeployController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 9
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A actionAll() 0 5 1
1
<?php
2
/**
3
 * Automation tool mixed with code generator for easier continuous development
4
 *
5
 * @link      https://github.com/hiqdev/hidev
6
 * @package   hidev
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2018, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hidev\console;
12
13
use hidev\components\Deployer;
14
15
/**
16
 * Deploy Controller.
17
 * TODO REDO the whole thing to be configurable
18
 */
19
class DeployController extends \yii\console\Controller
20
{
21
    public $defaultAction = 'all';
22
23
    public function actionAll($name = null, $command = 'all')
24
    {
25
        $deployer = new Deployer($name);
26
27
        return $deployer->call($command);
0 ignored issues
show
Bug introduced by
Are you sure the usage of $deployer->call($command) targeting hidev\components\Deployer::call() seems to always return null.

This check looks for function or method calls that always return null and whose return value is used.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
if ($a->getObject()) {

The method getObject() can return nothing but null, so it makes no sense to use the return value.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
28
    }
29
}
30