Skip to content

Commit

Permalink
Adjust the sorting rules of variables to group variables in the same …
Browse files Browse the repository at this point in the history
…configuration file together
  • Loading branch information
kayw-geek committed Apr 22, 2024
1 parent 2468219 commit f729f37
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Envy.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ public function environmentCalls(bool $excludeCallsWithDefaults = false): Collec
{
// @phpstan-ignore-next-line
return collect($this->finder->configFilePaths())
->map(fn (string $path) => ($this->findEnvironmentCalls)($path, $excludeCallsWithDefaults))
->flatten()
// @phpstan-ignore-next-line
->sortBy(fn (EnvironmentCall $call) => $call->getKey());
->sort()
->map(fn (string $path) => ($this->findEnvironmentCalls)($path, $excludeCallsWithDefaults)->sortBy(fn (EnvironmentCall $call) => $call->getKey()))
->flatten();
}

/**
Expand Down

0 comments on commit f729f37

Please sign in to comment.