Conditions | 4 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
39 | public static function copyEnv() |
||
40 | { |
||
41 | $rootDir = self::getRootPath(); |
||
42 | $envFile = $rootDir . '/.env'; |
||
43 | $envExampleFile = $rootDir . '/.env.example'; |
||
44 | |||
45 | if (!file_exists($envFile) && file_exists($envExampleFile)) { |
||
46 | if (copy($envExampleFile, $envFile)) { |
||
47 | echo ".env file created successfully from .env.example.\n"; |
||
48 | } else { |
||
49 | echo "Failed to create .env file from .env.example.\n"; |
||
50 | } |
||
55 |