Skip to content

Commit

Permalink
compare keys
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigopedra committed Apr 12, 2020
1 parent 75059d6 commit 2c8379d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Checks/ExampleEnvironmentVariablesAreSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ private function checkForDotEnvV4(): bool
$actual = Dotenv::createImmutable(base_path(), '.env');

$this->envVariables = Collection::make($examples->safeLoad())
->diff($actual->safeLoad());
->diffKeys($actual->safeLoad())
->keys();

return $this->envVariables->isEmpty();
}
Expand Down
3 changes: 2 additions & 1 deletion src/Checks/ExampleEnvironmentVariablesAreUpToDate.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ private function checkForDotEnvV4(): bool
$actual = Dotenv::createImmutable(base_path(), '.env');

$this->envVariables = Collection::make($actual->safeLoad())
->diff($examples->safeLoad());
->diffKeys($examples->safeLoad())
->keys();

return $this->envVariables->isEmpty();
}
Expand Down

0 comments on commit 2c8379d

Please sign in to comment.