Completed
Push — master ( ccfeeb...7d9725 )
by Alexey
02:50 queued 46s
created

HelloController::actionIndex()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 2
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 modules\users\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