Skip to content

Commit

Permalink
chore(composer): Simplify associateBy to associate
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Aug 7, 2024
1 parent b9f521e commit d2a1434
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions plugins/package-managers/composer/src/main/kotlin/Composer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,9 @@ class Composer(
}

private fun parseInstalledPackages(lockfile: Lockfile): Map<String, Package> =
(lockfile.packages + lockfile.packagesDev).associateBy(
{ checkNotNull(it.name) },
{ it.toPackage() }
)
(lockfile.packages + lockfile.packagesDev).associate {
checkNotNull(it.name) to it.toPackage()
}

private fun ensureLockfile(workingDir: File): File {
val lockfile = workingDir.resolve(COMPOSER_LOCK_FILE)
Expand Down

0 comments on commit d2a1434

Please sign in to comment.