File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -32,17 +32,23 @@ class ErrorInfo {
3232
3333function createOrder(User $user, $products): Result {
3434 if (!$user->isVerified())
35- return Result::fail(new ErrorInfo("unverified_user", "Unverified users are not allowed to order", [
36- 'user' => $user
37- ]);
35+ return Result::fail(
36+ new ErrorInfo("unverified_user", "Unverified users are not allowed to order", [
37+ 'user' => $user
38+ ])
39+ );
3840
3941 if ($user->hasDebts())
40- return Result::fail(new ErrorInfo("user_has_debts", "Users with debts are not allowed to order new items", [
41- 'user' => $user
42- ]);
42+ return Result::fail(
43+ new ErrorInfo("user_has_debts", "Users with debts are not allowed to order new items", [
44+ 'user' => $user
45+ ])
46+ );
4347
4448 if ($products->isEmpty())
45- return Result::fail(new ErrorInfo("no_products", "Products cannot be empty");
49+ return Result::fail(
50+ new ErrorInfo("no_products", "Products cannot be empty")
51+ );
4652
4753 // Create a new order here...
4854
You can’t perform that action at this time.
0 commit comments