@@ -143,12 +143,12 @@ private function unconfigureEnvFiles(Recipe $recipe, $vars)
143
143
continue ;
144
144
}
145
145
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 );
147
147
if (!$ count ) {
148
148
continue ;
149
149
}
150
150
151
- $ this ->write (sprintf ('Removing environment variables from %s ' , $ file ));
151
+ $ this ->write (\ sprintf ('Removing environment variables from %s ' , $ file ));
152
152
file_put_contents ($ env , $ contents );
153
153
}
154
154
}
@@ -161,12 +161,12 @@ private function unconfigurePhpUnit(Recipe $recipe, $vars)
161
161
continue ;
162
162
}
163
163
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 );
165
165
if (!$ count ) {
166
166
continue ;
167
167
}
168
168
169
- $ this ->write (sprintf ('Removing environment variables from %s ' , $ file ));
169
+ $ this ->write (\ sprintf ('Removing environment variables from %s ' , $ file ));
170
170
file_put_contents ($ phpunit , $ contents );
171
171
}
172
172
}
@@ -265,7 +265,7 @@ private function findExistingValue(string $var, string $filename, Recipe $recipe
265
265
266
266
$ lines = explode ("\n" , $ section );
267
267
foreach ($ lines as $ line ) {
268
- if (0 !== strpos ($ line , sprintf ('%s= ' , $ var ))) {
268
+ if (! str_starts_with ($ line , \ sprintf ('%s= ' , $ var ))) {
269
269
continue ;
270
270
}
271
271
0 commit comments