Code Duplication    Length = 12-12 lines in 2 locations

src/controllers/DumpController.php 2 locations

@@ 25-36 (lines=12) @@
22
     * Dump defined components.
23
     * @param string $name component name
24
     */
25
    public function actionIndex($name = null)
26
    {
27
        $data = Yii::$app->getComponents();
28
        if ($name) {
29
            if (empty($data[$name])) {
30
                Yii::error("'$name' not defined");
31
                return;
32
            }
33
            $data = [$name => $data[$name]];
34
        }
35
        echo Yaml::dump($data, 4);
36
    }
37
38
    /**
39
     * Dump defined controllers.
@@ 42-53 (lines=12) @@
39
     * Dump defined controllers.
40
     * @param string $name controller name
41
     */
42
    public function actionController($name = null)
43
    {
44
        $data = Yii::$app->controllerMap;
45
        if ($name) {
46
            if (empty($data[$name])) {
47
                Yii::error("'$name' not defined");
48
                return;
49
            }
50
            $data = [$name => $data[$name]];
51
        }
52
        echo Yaml::dump($data, 4);
53
    }
54
55
    /**
56
     * Dump defined aliases.