@@ -143,12 +143,12 @@ private function unconfigureEnvFiles(Recipe $recipe, $vars)
143143 continue ;
144144 }
145145
146- $ contents = preg_replace (sprintf ('{%s*###> %s ###.*###< %s ###%s+}s ' , "\n" , $ recipe ->getName (), $ recipe ->getName (), "\n" ), "\n" , file_get_contents ($ env ), -1 , $ count );
146+ $ contents = preg_replace (\ sprintf ('{%s*###> %s ###.*###< %s ###%s+}s ' , "\n" , $ recipe ->getName (), $ recipe ->getName (), "\n" ), "\n" , file_get_contents ($ env ), -1 , $ count );
147147 if (!$ count ) {
148148 continue ;
149149 }
150150
151- $ this ->write (sprintf ('Removing environment variables from %s ' , $ file ));
151+ $ this ->write (\ sprintf ('Removing environment variables from %s ' , $ file ));
152152 file_put_contents ($ env , $ contents );
153153 }
154154 }
@@ -161,12 +161,12 @@ private function unconfigurePhpUnit(Recipe $recipe, $vars)
161161 continue ;
162162 }
163163
164- $ contents = preg_replace (sprintf ('{%s*\s+<!-- ###\+ %s ### -->.*<!-- ###- %s ### -->%s+}s ' , "\n" , $ recipe ->getName (), $ recipe ->getName (), "\n" ), "\n" , file_get_contents ($ phpunit ), -1 , $ count );
164+ $ contents = preg_replace (\ sprintf ('{%s*\s+<!-- ###\+ %s ### -->.*<!-- ###- %s ### -->%s+}s ' , "\n" , $ recipe ->getName (), $ recipe ->getName (), "\n" ), "\n" , file_get_contents ($ phpunit ), -1 , $ count );
165165 if (!$ count ) {
166166 continue ;
167167 }
168168
169- $ this ->write (sprintf ('Removing environment variables from %s ' , $ file ));
169+ $ this ->write (\ sprintf ('Removing environment variables from %s ' , $ file ));
170170 file_put_contents ($ phpunit , $ contents );
171171 }
172172 }
@@ -265,7 +265,7 @@ private function findExistingValue(string $var, string $filename, Recipe $recipe
265265
266266 $ lines = explode ("\n" , $ section );
267267 foreach ($ lines as $ line ) {
268- if (0 !== strpos ($ line , sprintf ('%s= ' , $ var ))) {
268+ if (! str_starts_with ($ line , \ sprintf ('%s= ' , $ var ))) {
269269 continue ;
270270 }
271271
0 commit comments