@@ -85,7 +85,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8585 $ dotenvPath = $ this ->projectDirectory ;
8686
8787 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 ' ] ?? [];
8989
9090 if (isset ($ runtimeConfig ['dotenv_path ' ])) {
9191 $ dotenvPath = $ this ->projectDirectory .'/ ' .$ runtimeConfig ['dotenv_path ' ];
@@ -98,18 +98,18 @@ protected function execute(InputInterface $input, OutputInterface $output): int
9898 $ envFiles = $ this ->getEnvFiles ($ filePath );
9999 $ availableFiles = array_filter ($ envFiles , 'is_file ' );
100100
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 )));
103103 }
104104
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 )));
107107 }
108108
109109 $ io ->section ('Scanned Files (in descending priority) ' );
110110 $ 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 ));
113113
114114 $ nameFilter = $ input ->getArgument ('filter ' );
115115 $ variables = $ this ->getVariables ($ availableFiles , $ nameFilter );
@@ -124,7 +124,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
124124
125125 $ io ->comment ('Note that values might be different between web and CLI. ' );
126126 } 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 ));
128128 }
129129
130130 return 0 ;
@@ -188,17 +188,17 @@ private function getAvailableVars(): array
188188 private function getEnvFiles (string $ filePath ): array
189189 {
190190 $ 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 ),
194194 ];
195195
196196 if ('test ' !== $ this ->kernelEnvironment ) {
197- $ files [] = sprintf ('%s.local ' , $ filePath );
197+ $ files [] = \ sprintf ('%s.local ' , $ filePath );
198198 }
199199
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 );
202202 } else {
203203 $ files [] = $ filePath ;
204204 }
0 commit comments