Merge pull request #14254 from yashodha/add_dev_tab
[civicrm-core.git] / CRM / Contact / BAO / ContactType.php
index 2b264dd8be8a2b19d07d34c4e978a6e7cd552699..b0d25258ef6d60ea2280d4a4781cff46659651c7 100644 (file)
@@ -462,8 +462,9 @@ AND   ( p.is_active = 1 OR p.id IS NULL )
   /**
    * Retrieve the basic contact type associated with given subType.
    *
-   * @param array /string $subType contact subType.
-   * @return array/string of basicTypes.
+   * @param array|string $subType contact subType.
+   * @return array|string
+   *   basicTypes.
    */
   public static function getBasicType($subType) {
     static $_cache = NULL;
@@ -664,7 +665,7 @@ WHERE name = %1";
     else {
       $name = self::getBasicType($contactName);
       if (!$name) {
-        return;
+        return NULL;
       }
       $value = ['name' => "New $name"];
       CRM_Core_BAO_Navigation::retrieve($value, $navinfo);
@@ -784,7 +785,6 @@ WHERE name = %1";
 
       $customDataCount = CRM_Core_DAO::singleValueQuery($sql);
       if (!empty($customDataCount)) {
-        $dao->free();
         return TRUE;
       }
     }
@@ -891,6 +891,7 @@ WHERE extends = %1 AND " . implode(" OR ", $subTypeClause);
    *   Custom group id.
    * @param array $subtypes
    *   List of subtypes related to which entry is to be removed.
+   * @param array $subtypesToPreserve
    *
    * @return bool
    */