Skip to content

Commit

Permalink
Use envGet to determine if a key exists
Browse files Browse the repository at this point in the history
  • Loading branch information
kevindierkx committed Nov 11, 2022
1 parent 4326d6e commit 2af6c6d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Commands/Concerns/InteractsWithEnv.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ protected function envGet(string $key): ?string
*/
protected function envHas(string $key): bool
{
$env = file_get_contents($this->laravel->environmentFilePath());

return strpos($env, $key) !== false;
return ! is_null($this->envGet($key));
}

protected function isValidKey(string $key): bool
Expand Down

0 comments on commit 2af6c6d

Please sign in to comment.