Skip to content

Commit a562202

Browse files
Remove unused code and unnecessary else branches
1 parent 6c82c9d commit a562202

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Dumper/PhpDumper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1940,11 +1940,11 @@ private function dumpValue(mixed $value, bool $interpolate = true): string
19401940
// we do this to deal with non string values (Boolean, integer, ...)
19411941
// the preg_replace_callback converts them to strings
19421942
return $this->dumpParameter($match[1]);
1943-
} else {
1944-
$replaceParameters = fn ($match) => "'.".$this->dumpParameter($match[2]).".'";
1945-
1946-
return str_replace('%%', '%', preg_replace_callback('/(?<!%)(%)([^%]+)\1/', $replaceParameters, $this->export($value)));
19471943
}
1944+
1945+
$replaceParameters = fn($match) => "'." . $this->dumpParameter($match[2]) . ".'";
1946+
1947+
return str_replace('%%', '%', preg_replace_callback('/(?<!%)(%)([^%]+)\1/', $replaceParameters, $this->export($value)));
19481948
} elseif ($value instanceof \UnitEnum) {
19491949
return \sprintf('\%s::%s', $value::class, $value->name);
19501950
} elseif ($value instanceof AbstractArgument) {

EnvVarProcessor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ public function getEnv(string $prefix, string $name, \Closure $getEnv): mixed
151151

152152
if ('file' === $prefix) {
153153
return file_get_contents($file);
154-
} else {
155-
return require $file;
156154
}
155+
156+
return require $file;
157157
}
158158

159159
$returnNull = false;

0 commit comments

Comments
 (0)