BatchController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 80%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 35
ccs 4
cts 5
cp 0.8
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getYiiConfiguration() 0 9 2
1
<?php
2
namespace cornernote\gii\commands;
3
4
use yii\console\Application;
5
use yii\helpers\ArrayHelper;
6
use schmunk42\giiant\crud\Generator;
7
use yii\helpers\Inflector;
8
9
/**
10
 * Batch Controller
11
 *
12
 * @package app\commands
13
 */
14
class BatchController extends \schmunk42\giiant\commands\BatchController
15
{
16
17
    public $interactive = 0;
18
19
    public $template = 'cornernote';
20
    public $overwrite = true;
21
    public $modelNamespace = 'app\models';
22
    public $crudControllerNamespace = 'app\controllers';
23
    public $crudSearchModelNamespace = 'app\models\search';
24
    public $crudSearchModelSuffix = 'Search';
25
    public $crudViewPath = '@app/views';
26
    public $crudPathPrefix = '';
27
    public $crudProviders = [
28
        '\cornernote\gii\giiant\crud\providers\RelationProvider',
29
        '\cornernote\gii\giiant\crud\providers\DateProvider',
30
        '\cornernote\gii\giiant\crud\providers\DateTimeProvider',
31
        '\cornernote\gii\giiant\crud\providers\CallbackProvider',
32
        '\cornernote\gii\giiant\crud\providers\EditorProvider',
33
    ];
34
35
    /**
36
     * @return array
37
     */
38 3
    protected function getYiiConfiguration()
39
    {
40 3
        if (YII_ENV == 'test') {
41
            return [
42 3
                'basePath' => \Yii::getAlias('@tests'),
43 3
            ];
44
        }
45
        return parent::getYiiConfiguration();
46
    }
47
48
}