Completed
Push — master ( 41af59...12d8af )
by Andrii
05:07
created

DumpController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 0%

Importance

Changes 3
Bugs 1 Features 0
Metric Value
wmc 2
c 3
b 1
f 0
lcom 0
cbo 4
dl 0
loc 17
ccs 0
cts 13
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A actionMake() 0 6 1
A actionInternals() 0 7 1
1
<?php
2
3
/*
4
 * Task runner, code generator and build tool for easier continuos integration
5
 *
6
 * @link      https://github.com/hiqdev/hidev
7
 * @package   hidev
8
 * @license   BSD-3-Clause
9
 * @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
10
 */
11
12
namespace hidev\controllers;
13
14
use Symfony\Component\Yaml\Yaml;
15
use Yii;
16
use yii\helpers\ArrayHelper;
17
18
/**
19
 * Dump goal.
20
 */
21
class DumpController extends CommonController
22
{
23
    public function actionMake()
24
    {
25
        $data = $this->takeConfig()->getItems();
26
        unset($data['dump'], $data['start']);
27
        echo Yaml::dump(ArrayHelper::toArray($data), 4);
28
    }
29
30
    public function actionInternals()
31
    {
32
        $internals = [
33
            'aliases'   => Yii::$aliases,
34
        ];
35
        echo Yaml::dump($internals, 4);
36
    }
37
}
38