HelloController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

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

1 Method

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