| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | public function actionInit() |
||
| 35 | { |
||
| 36 | $source = Yii::getAlias('@app/config/config.local'); |
||
| 37 | $dist = Yii::getAlias($this->path); |
||
| 38 | |||
| 39 | if (!file_exists($dist)) { |
||
| 40 | copy($source, $dist); |
||
| 41 | return $this->stdout("Created successfully!\n", Console::FG_GREEN); |
||
| 42 | } |
||
| 43 | return $this->stdout("Config file is exist!\n", Console::FG_RED); // @codeCoverageIgnore |
||
| 44 | } |
||
| 45 | } |
||
| 46 |