Skip to content

Commit 563b6a8

Browse files
committed
Remove unnecessary conditionals
1 parent 0d73c3b commit 563b6a8

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

src/Omnipay/PayPal/Message/ExpressAuthorizeRequest.php

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,13 @@ public function getData()
2525
$data['LANDINGPAGE'] = $this->getLandingPage();
2626
$data['RETURNURL'] = $this->getReturnUrl();
2727
$data['CANCELURL'] = $this->getCancelUrl();
28+
$data['HDRIMG'] = $this->getHeaderImageUrl();
29+
$data['BRANDNAME'] = $this->getBrandName();
30+
$data['NOSHIPPING'] = $this->getNoShipping();
31+
$data['ALLOWNOTE'] = $this->getAllowNote();
2832

29-
if ($headerImageUrl = $this->getHeaderImageUrl()) {
30-
$data['HDRIMG'] = $headerImageUrl;
31-
}
32-
33-
if ($brandName = $this->getBrandName()) {
34-
$data['BRANDNAME'] = $brandName;
35-
}
36-
37-
if (null !== ($noShipping = $this->getNoShipping())) {
38-
$data['NOSHIPPING'] = $noShipping;
39-
}
40-
41-
if (null !== ($allowNote = $this->getAllowNote())) {
42-
$data['ALLOWNOTE'] = $allowNote;
43-
}
44-
45-
if ($card = $this->getCard()) {
33+
$card = $this->getCard();
34+
if ($card) {
4635
$data['PAYMENTREQUEST_0_SHIPTONAME'] = $card->getName();
4736
$data['PAYMENTREQUEST_0_SHIPTOSTREET'] = $card->getAddress1();
4837
$data['PAYMENTREQUEST_0_SHIPTOSTREET2'] = $card->getAddress2();

0 commit comments

Comments
 (0)