Skip to content

Commit

Permalink
Convert to null coalescing
Browse files Browse the repository at this point in the history
  • Loading branch information
chikeozulumba committed Aug 27, 2020
1 parent 0362354 commit fa339c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Paystack.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function makePaymentRequest( $data = null)
{
if ( $data == null ) {

$quantity = intval(request()->quantity ? request()->quantity : 1);
$quantity = intval(request()->quantity ?? 1);

$data = [
"amount" => intval(request()->amount) * $quantity,
Expand Down

0 comments on commit fa339c5

Please sign in to comment.