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

DumpController::actionInternals()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
ccs 0
cts 7
cp 0
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
crap 2
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