Skip to content

Commit de73a3a

Browse files
CS fixes
1 parent 4dc1191 commit de73a3a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Configurator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function unconfigure(Recipe $recipe, Lock $lock)
104104
private function get($key): AbstractConfigurator
105105
{
106106
if (!isset($this->configurators[$key]) && !isset($this->postInstallConfigurators[$key])) {
107-
throw new \InvalidArgumentException(sprintf('Unknown configurator "%s".', $key));
107+
throw new \InvalidArgumentException(\sprintf('Unknown configurator "%s".', $key));
108108
}
109109

110110
if (isset($this->cache[$key])) {

src/Configurator/EnvConfigurator.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)