Skip to content

Order#9

Open
astrialyanda wants to merge 28 commits into
masterfrom
order
Open

Order#9
astrialyanda wants to merge 28 commits into
masterfrom
order

Conversation

@astrialyanda

Copy link
Copy Markdown
Owner

No description provided.


private final String value;

private OrderStatus(String value) {

Check warning

Code scanning / PMD

Unnecessary modifier 'public' on method 'getAllPayments': the method is declared in an interface type

Unnecessary modifier 'private' on constructor 'OrderStatus(String)': enum constructors are implicitly private
}

public static boolean contains(String param) {
for (OrderStatus orderStatus : OrderStatus.values()) {

Check warning

Code scanning / PMD

Unnecessary qualifier 'PaymentStatus': 'values' is already in scope

Unnecessary qualifier 'OrderStatus': 'values' is already in scope
import java.util.List;

public interface OrderService {
public Order createOrder(Order order);

Check warning

Code scanning / PMD

Unnecessary modifier 'public' on method 'getAllPayments': the method is declared in an interface type

Unnecessary modifier 'public' on method 'createOrder': the method is declared in an interface type

public interface OrderService {
public Order createOrder(Order order);
public Order updateStatus(String orderId, String status);

Check warning

Code scanning / PMD

Unnecessary modifier 'public' on method 'getAllPayments': the method is declared in an interface type

Unnecessary modifier 'public' on method 'updateStatus': the method is declared in an interface type
public interface OrderService {
public Order createOrder(Order order);
public Order updateStatus(String orderId, String status);
public Order findById(String orderId);

Check warning

Code scanning / PMD

Unnecessary modifier 'public' on method 'getAllPayments': the method is declared in an interface type

Unnecessary modifier 'public' on method 'findById': the method is declared in an interface type
public interface PaymentService {
public Payment addPayment(String paymentId, Order order, String method, Map<String, String> paymentData);
public Payment setStatus(Payment payment, String status);
public Payment getPayment(String paymentId);

Check warning

Code scanning / PMD

Unnecessary modifier 'public' on method 'getAllPayments': the method is declared in an interface type

Unnecessary modifier 'public' on method 'getPayment': the method is declared in an interface type
public Payment addPayment(String paymentId, Order order, String method, Map<String, String> paymentData);
public Payment setStatus(Payment payment, String status);
public Payment getPayment(String paymentId);
public List<Payment> getAllPayments();

Check warning

Code scanning / PMD

Unnecessary modifier 'public' on method 'getAllPayments': the method is declared in an interface type

Unnecessary modifier 'public' on method 'getAllPayments': the method is declared in an interface type

import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;

Check warning

Code scanning / PMD

Unused import 'java.util.NoSuchElementException'

Unused import 'java.util.NoSuchElementException'
@Override
public Payment setStatus(Payment payment, String status) {
Order currentOrder = payment.getOrder();
if (status.equals("SUCCESS")) {

Check warning

Code scanning / PMD

Position literals first in String comparisons

Position literals first in String comparisons
Order currentOrder = payment.getOrder();
if (status.equals("SUCCESS")) {
currentOrder.setStatus(OrderStatus.SUCCESS.getValue());
} else if (status.equals("REJECTED")) {

Check warning

Code scanning / PMD

Position literals first in String comparisons

Position literals first in String comparisons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants