Skip to content

Commit

Permalink
Fix getKey method (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoSot authored Jan 20, 2022
1 parent 19337e1 commit 9ae2c0b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Helpers/EnvKeysManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ public function keyExists(string $key): bool
*/
public function getKey(string $key, $default = null)
{
return $this->getEnvData()->get($key, $default);
$result = $this->getEnvData()->firstWhere('key', '==', $key);

return $result ? $result['value'] ?: $default : $default;
}

/**
Expand Down

0 comments on commit 9ae2c0b

Please sign in to comment.