Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
41 | 1 | public function actionInit() |
|
42 | { |
||
43 | 1 | $source = Yii::getAlias('@app/config/config.local'); |
|
44 | 1 | $dist = Yii::getAlias($this->path); |
|
45 | |||
46 | 1 | if (!file_exists($dist)) { |
|
47 | 1 | copy($source, $dist); |
|
48 | 1 | $this->stdout("Created successfully!\n", Console::FG_GREEN); |
|
49 | 1 | } else { |
|
50 | $this->stdout("Config file is exist!\n", Console::FG_RED); // @codeCoverageIgnore |
||
51 | } |
||
52 | 1 | } |
|
53 | } |
||
54 |