Skip to content

Commit

Permalink
Fix style of the code
Browse files Browse the repository at this point in the history
  • Loading branch information
msiewierska committed Apr 6, 2024
1 parent 1de7842 commit 959ecb2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/main/java/pl/edu/agh/mwo/invoice/Invoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ public void addProduct(Product product, Integer quantity) {
throw new IllegalArgumentException();
}

Product productThatAlreadyExists = products.keySet().stream().filter(key -> key.getName().equals(product.getName())).findFirst().orElse(null) ;
Product productThatAlreadyExists = products.keySet()
.stream().filter(key -> key.getName().equals(product.getName()))
.findFirst().orElse(null);

if (productThatAlreadyExists != null) {
int qty = products.get(productThatAlreadyExists);
Expand Down Expand Up @@ -78,8 +80,7 @@ public String getPrint() {
return print;
}

public Map<Product, Integer> getProducts
() {
public Map<Product, Integer> getProducts() {
return products;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class BottleOfWine extends Product {

private final BigDecimal akcyza;

public BottleOfWine(String name, BigDecimal price,BigDecimal tax) {
public BottleOfWine(String name, BigDecimal price, BigDecimal tax) {

super(name, price, tax);

Expand Down

0 comments on commit 959ecb2

Please sign in to comment.