Completed
Push — master ( 888ce0...dfbe13 )
by Alexey
18s queued 11s
created

HelloController::actionIndex()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * @link http://www.yiiframework.com/
4
 * @copyright Copyright (c) 2008 Yii Software LLC
5
 * @license http://www.yiiframework.com/license/
6
 */
7
8
namespace app\commands;
9
10
use yii\console\Controller;
11
use yii\console\ExitCode;
12
13
/**
14
 * This command echoes the first argument that you have entered.
15
 *
16
 * This command is provided as an example for you to learn how to create console commands.
17
 *
18
 * @author Qiang Xue <[email protected]>
19
 * @since 2.0
20
 */
21
class HelloController extends Controller
22
{
23
    /**
24
     * This command echoes what you have entered as the message.
25
     * @param string $message the message to be echoed.
26
     * @return int Exit code
27
     */
28
    public function actionIndex($message = 'hello world')
29
    {
30
        echo $message . "\n";
31
32
        return ExitCode::OK;
33
    }
34
}
35