Merge pull request #14010 from colemanw/assetCheck
[civicrm-core.git] / CRM / Core / BAO / CustomValue.php
index 5e6a90fb662fec803c07093913db208d614d11eb..7df55cc393e1d79bc43732238b209023a06a502c 100644 (file)
@@ -157,7 +157,6 @@ class CRM_Core_BAO_CustomValue extends CRM_Core_DAO {
     }
   }
 
-
   /**
    * @param array $formValues
    * @return null
@@ -183,14 +182,14 @@ class CRM_Core_BAO_CustomValue extends CRM_Core_DAO {
 
       if (is_array($formValues[$key])) {
         if (!in_array(key($formValues[$key]), CRM_Core_DAO::acceptedSQLOperators(), TRUE)) {
-          $formValues[$key] = array('IN' => $formValues[$key]);
+          $formValues[$key] = ['IN' => $formValues[$key]];
         }
       }
       elseif (($htmlType == 'TextArea' ||
           ($htmlType == 'Text' && $dataType == 'String')
         ) && strstr($formValues[$key], '%')
       ) {
-        $formValues[$key] = array('LIKE' => $formValues[$key]);
+        $formValues[$key] = ['LIKE' => $formValues[$key]];
       }
     }
   }
@@ -208,9 +207,9 @@ class CRM_Core_BAO_CustomValue extends CRM_Core_DAO {
     $tableName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomGroup', $customGroupID, 'table_name');
 
     // Retrieve the $entityId so we can pass that to the hook.
-    $entityID = CRM_Core_DAO::singleValueQuery("SELECT entity_id FROM {$tableName} WHERE id = %1", array(
-      1 => array($customValueID, 'Integer'),
-    ));
+    $entityID = CRM_Core_DAO::singleValueQuery("SELECT entity_id FROM {$tableName} WHERE id = %1", [
+      1 => [$customValueID, 'Integer'],
+    ]);
 
     // delete custom value from corresponding custom value table
     $sql = "DELETE FROM {$tableName} WHERE id = {$customValueID}";