Skip to content

Commit

Permalink
Merge pull request #29101 from colemanw/validateSubTypeByEntity
Browse files Browse the repository at this point in the history
dev/core#4905 - Make internal function private again
  • Loading branch information
demeritcowboy authored Jan 26, 2024
2 parents 3129207 + e7c5a11 commit be3c0af
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions CRM/Core/BAO/CustomGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ public static function getTree(
];
if ($subTypes) {
foreach ($subTypes as $subType) {
$filters['extends_entity_column_value'][] = CRM_Core_BAO_CustomGroup::validateSubTypeByEntity($entityType, $subType);
$filters['extends_entity_column_value'][] = self::validateSubTypeByEntity($entityType, $subType);
}
if (!$onlySubType) {
$filters['extends_entity_column_value'][] = NULL;
Expand Down Expand Up @@ -665,15 +665,13 @@ private static function formatLegacyDbValues(array &$values): void {
*
* For all other entities, it doesn't validate except to check the subtype is an integer.
*
* @internal this will be private again soon.
*
* @param string $entityType
* @param string $subType
*
* @return string
* @throws \CRM_Core_Exception
*/
public static function validateSubTypeByEntity($entityType, $subType) {
private static function validateSubTypeByEntity($entityType, $subType) {
$subType = trim($subType, CRM_Core_DAO::VALUE_SEPARATOR);
if (is_numeric($subType)) {
return $subType;
Expand Down

0 comments on commit be3c0af

Please sign in to comment.