File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -84,5 +84,5 @@ class Paths
84
84
* This variable must contain the name of the directory for
85
85
* environment files.
86
86
*/
87
- public string $ environmentDirectory = __DIR__ . '/../../ ' ;
87
+ public string $ envDirectory = __DIR__ . '/../../ ' ;
88
88
}
Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ public static function preload(Paths $paths): void
170
170
protected static function loadDotEnv (Paths $ paths ): void
171
171
{
172
172
require_once $ paths ->systemDirectory . '/Config/DotEnv.php ' ;
173
- (new DotEnv ($ paths ->environmentDirectory ))->load ();
173
+ (new DotEnv ($ paths ->envDirectory ))->load ();
174
174
}
175
175
176
176
protected static function defineEnvironment (): void
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ public function run(array $params)
102
102
// force DotEnv to reload the new env vars
103
103
putenv ('encryption.key ' );
104
104
unset($ _ENV ['encryption.key ' ], $ _SERVER ['encryption.key ' ]);
105
- $ dotenv = new DotEnv ((new Paths ())->environmentDirectory );
105
+ $ dotenv = new DotEnv ((new Paths ())->envDirectory );
106
106
$ dotenv ->load ();
107
107
108
108
CLI ::write ('Application \'s new encryption key was successfully set. ' , 'green ' );
@@ -156,7 +156,7 @@ protected function confirmOverwrite(array $params): bool
156
156
protected function writeNewEncryptionKeyToFile (string $ oldKey , string $ newKey ): bool
157
157
{
158
158
$ baseEnv = ROOTPATH . 'env ' ;
159
- $ envFile = (new Paths ())->environmentDirectory . '.env ' ;
159
+ $ envFile = (new Paths ())->envDirectory . '.env ' ;
160
160
161
161
if (! is_file ($ envFile )) {
162
162
if (! is_file ($ baseEnv )) {
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ public function run(array $params)
120
120
// however we cannot redefine the ENVIRONMENT constant
121
121
putenv ('CI_ENVIRONMENT ' );
122
122
unset($ _ENV ['CI_ENVIRONMENT ' ], $ _SERVER ['CI_ENVIRONMENT ' ]);
123
- (new DotEnv ((new Paths ())->environmentDirectory ))->load ();
123
+ (new DotEnv ((new Paths ())->envDirectory ))->load ();
124
124
125
125
CLI ::write (sprintf ('Environment is successfully changed to "%s". ' , $ env ), 'green ' );
126
126
CLI ::write ('The ENVIRONMENT constant will be changed in the next script execution. ' );
@@ -135,7 +135,7 @@ public function run(array $params)
135
135
private function writeNewEnvironmentToEnvFile (string $ newEnv ): bool
136
136
{
137
137
$ baseEnv = ROOTPATH . 'env ' ;
138
- $ envFile = (new Paths ())->environmentDirectory . '.env ' ;
138
+ $ envFile = (new Paths ())->envDirectory . '.env ' ;
139
139
140
140
if (! is_file ($ envFile )) {
141
141
if (! is_file ($ baseEnv )) {
You can’t perform that action at this time.
0 commit comments