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

HelloController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 3
c 1
b 0
f 0
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A actionIndex() 0 5 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