Skip to content
Open

hw #46

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
kotlin("jvm") version "1.8.0"
kotlin("jvm") version "2.1.0"
application
id("io.gitlab.arturbosch.detekt") version "1.23.3"
}
Expand All @@ -20,7 +20,7 @@ tasks.test {
}

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

detekt {
Expand Down
8 changes: 6 additions & 2 deletions src/main/kotlin/mate/academy/StoreService.kt
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
package mate.academy

class StoreService {
// Function to update the store's stock with `with`
fun updateStoreStock(store: Store, extraShoes: Int, extraShirts: Int, extraJackets: Int) {
// TODO: implement
with(store) {
store.shoes += extraShoes
store.shirts += extraShirts
store.jackets += extraJackets
store.printInventory()
}
}
}