Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 966f190

Browse files
Remove unused code and unnecessary else branches
1 parent ccc9d84 commit 966f190

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

Dotenv.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ private function resolveVariables(string $value, array $loadedVars): string
485485
(?P<closing_brace>\})? # optional closing brace
486486
/x';
487487

488-
$value = preg_replace_callback($regex, function ($matches) use ($loadedVars) {
488+
return preg_replace_callback($regex, function ($matches) use ($loadedVars) {
489489
// odd number of backslashes means the $ character is escaped
490490
if (1 === \strlen($matches['backslashes']) % 2) {
491491
return substr($matches[0], 1);
@@ -532,8 +532,6 @@ private function resolveVariables(string $value, array $loadedVars): string
532532

533533
return $matches['backslashes'].$value;
534534
}, $value);
535-
536-
return $value;
537535
}
538536

539537
private function moveCursor(string $text): void

0 commit comments

Comments
 (0)