Replace CRM_Utils_Array::value with ?? in variable assignments
[civicrm-core.git] / CRM / Financial / BAO / PaymentProcessor.php
index b577a7fca64a31729c6e86659417746b8750e1ef..21d26259ac2af9fc26f15315521e75e2e21fbf1a 100644 (file)
@@ -262,8 +262,8 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
    * @return int
    */
   public static function defaultComparison($processor1, $processor2) {
-    $p1 = CRM_Utils_Array::value('is_default', $processor1);
-    $p2 = CRM_Utils_Array::value('is_default', $processor2);
+    $p1 = $processor1['is_default'] ?? NULL;
+    $p2 = $processor2['is_default'] ?? NULL;
     if ($p1 == $p2) {
       return 0;
     }
@@ -532,7 +532,7 @@ INNER JOIN civicrm_contribution       con ON ( mp.contribution_id = con.id )
 
     }
 
-    $ppID = (isset($dao->ppID1) && $dao->ppID1) ? $dao->ppID1 : (isset($dao->ppID2) ? $dao->ppID2 : NULL);
+    $ppID = (isset($dao->ppID1) && $dao->ppID1) ? $dao->ppID1 : ($dao->ppID2 ?? NULL);
     $mode = (isset($dao->is_test) && $dao->is_test) ? 'test' : 'live';
     if (!$ppID || $type == 'id') {
       $result = $ppID;