Move assignment out of if
authorEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 17 Oct 2023 21:34:22 +0000 (10:34 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 17 Oct 2023 21:34:22 +0000 (10:34 +1300)
CRM/Contribute/Form/ContributionBase.php

index 7130487d62adeabd889021eb5eda459689480976..5bcd39961163c29c941adb2c1f048433607f6d17 100644 (file)
@@ -487,10 +487,7 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form {
       $this->assign('linkText', $linkText);
     }
 
-    //set pledge block if block id is set
-    if (!empty($this->_values['pledge_block_id'])) {
-      $this->assign('pledgeBlock', TRUE);
-    }
+    $this->assign('pledgeBlock', !empty($this->_values['pledge_block_id']));
 
     // @todo - move this check to `getMembershipBlock`
     if (!$this->isFormSupportsNonMembershipContributions() &&