Skip to content

Commit

Permalink
Simplify return.
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Oct 20, 2019
1 parent 6e6a345 commit fd7402a
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/Base/PaymentCompletion.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ public function redirect(array $data = []): ?array
'billplzid', 'billplzpaid_at', 'billplzpaid',
]);

if ((bool) $validated) {
return $this->filterResponse($data['billplz']);
}

return null;
return $validated === true ? $this->filterResponse($data['billplz']) : null;
}

/**
Expand All @@ -57,11 +53,7 @@ public function webhook(array $data = []): ?array
'paid_amount', 'paid_at', 'paid', 'state', 'url',
]);

if ((bool) $validated) {
return $this->filterResponse($data);
}

return null;
return $validated === true ? $this->filterResponse($data) : null;
}

/**
Expand Down

0 comments on commit fd7402a

Please sign in to comment.