@@ -85,7 +85,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
85
85
$ dotenvPath = $ this ->projectDirectory ;
86
86
87
87
if (is_file ($ composerFile = $ this ->projectDirectory .'/composer.json ' )) {
88
- $ runtimeConfig = ( json_decode (file_get_contents ($ composerFile ), true ) )['extra ' ]['runtime ' ] ?? [];
88
+ $ runtimeConfig = json_decode (file_get_contents ($ composerFile ), true )['extra ' ]['runtime ' ] ?? [];
89
89
90
90
if (isset ($ runtimeConfig ['dotenv_path ' ])) {
91
91
$ dotenvPath = $ this ->projectDirectory .'/ ' .$ runtimeConfig ['dotenv_path ' ];
@@ -98,18 +98,18 @@ protected function execute(InputInterface $input, OutputInterface $output): int
98
98
$ envFiles = $ this ->getEnvFiles ($ filePath );
99
99
$ availableFiles = array_filter ($ envFiles , 'is_file ' );
100
100
101
- if (\in_array (sprintf ('%s.local.php ' , $ filePath ), $ availableFiles , true )) {
102
- $ io ->warning (sprintf ('Due to existing dump file (%s.local.php) all other dotenv files are skipped. ' , $ this ->getRelativeName ($ filePath )));
101
+ if (\in_array (\ sprintf ('%s.local.php ' , $ filePath ), $ availableFiles , true )) {
102
+ $ io ->warning (\ sprintf ('Due to existing dump file (%s.local.php) all other dotenv files are skipped. ' , $ this ->getRelativeName ($ filePath )));
103
103
}
104
104
105
- if (is_file ($ filePath ) && is_file (sprintf ('%s.dist ' , $ filePath ))) {
106
- $ io ->warning (sprintf ('The file %s.dist gets skipped due to the existence of %1$s. ' , $ this ->getRelativeName ($ filePath )));
105
+ if (is_file ($ filePath ) && is_file (\ sprintf ('%s.dist ' , $ filePath ))) {
106
+ $ io ->warning (\ sprintf ('The file %s.dist gets skipped due to the existence of %1$s. ' , $ this ->getRelativeName ($ filePath )));
107
107
}
108
108
109
109
$ io ->section ('Scanned Files (in descending priority) ' );
110
110
$ io ->listing (array_map (fn (string $ envFile ) => \in_array ($ envFile , $ availableFiles , true )
111
- ? sprintf ('<fg=green>✓</> %s ' , $ this ->getRelativeName ($ envFile ))
112
- : sprintf ('<fg=red>⨯</> %s ' , $ this ->getRelativeName ($ envFile )), $ envFiles ));
111
+ ? \ sprintf ('<fg=green>✓</> %s ' , $ this ->getRelativeName ($ envFile ))
112
+ : \ sprintf ('<fg=red>⨯</> %s ' , $ this ->getRelativeName ($ envFile )), $ envFiles ));
113
113
114
114
$ nameFilter = $ input ->getArgument ('filter ' );
115
115
$ variables = $ this ->getVariables ($ availableFiles , $ nameFilter );
@@ -124,7 +124,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
124
124
125
125
$ io ->comment ('Note that values might be different between web and CLI. ' );
126
126
} else {
127
- $ io ->warning (sprintf ('No variables match the given filter "%s". ' , $ nameFilter ));
127
+ $ io ->warning (\ sprintf ('No variables match the given filter "%s". ' , $ nameFilter ));
128
128
}
129
129
130
130
return 0 ;
@@ -188,17 +188,17 @@ private function getAvailableVars(): array
188
188
private function getEnvFiles (string $ filePath ): array
189
189
{
190
190
$ files = [
191
- sprintf ('%s.local.php ' , $ filePath ),
192
- sprintf ('%s.%s.local ' , $ filePath , $ this ->kernelEnvironment ),
193
- sprintf ('%s.%s ' , $ filePath , $ this ->kernelEnvironment ),
191
+ \ sprintf ('%s.local.php ' , $ filePath ),
192
+ \ sprintf ('%s.%s.local ' , $ filePath , $ this ->kernelEnvironment ),
193
+ \ sprintf ('%s.%s ' , $ filePath , $ this ->kernelEnvironment ),
194
194
];
195
195
196
196
if ('test ' !== $ this ->kernelEnvironment ) {
197
- $ files [] = sprintf ('%s.local ' , $ filePath );
197
+ $ files [] = \ sprintf ('%s.local ' , $ filePath );
198
198
}
199
199
200
- if (!is_file ($ filePath ) && is_file (sprintf ('%s.dist ' , $ filePath ))) {
201
- $ files [] = sprintf ('%s.dist ' , $ filePath );
200
+ if (!is_file ($ filePath ) && is_file (\ sprintf ('%s.dist ' , $ filePath ))) {
201
+ $ files [] = \ sprintf ('%s.dist ' , $ filePath );
202
202
} else {
203
203
$ files [] = $ filePath ;
204
204
}
0 commit comments