Skip to content

Commit

Permalink
Fix Codeclimate
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianoc72 committed Aug 11, 2024
1 parent 308bd08 commit acb62b7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/ParamResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,11 @@ private function resolveString(string $value, array $resolving = []): mixed
return $this->resolveString($resolved, $resolving);
}, $value);

if (!isset($onlyKey)) {
return $replaced;
if ($setKey = isset($onlyKey)) {
$resolving[$onlyKey] = true;
}

$resolving[$onlyKey] = true;

return $this->resolveValue($this->get($onlyKey), $resolving);
return $setKey ? $this->resolveValue($this->get($onlyKey), $resolving) : $replaced;
}

/**
Expand Down

0 comments on commit acb62b7

Please sign in to comment.