Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions moxygen/main/default/classes/utilities/dynamic-types/TypeOf.cls
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,18 @@
* @since 11/16/2024
* @group Utilities
*/
@SuppressWarnings('PMD.StdCyclomaticComplexity')
public with sharing class TypeOf {
/**
* @description Given an object, determine the type of the object.
* @param obj `Object`
* @return `String`
*/
@SuppressWarnings('PMD.CyclomaticComplexity')
public static String forObject(Object obj) {
if (obj == null) {
return ApexTypes.XNULL;
} else {
return dynamicallyGetTypeByInvokingAnException(obj);
String typeName = ApexTypes.XNULL;
if (obj != null) {
typeName = dynamicallyGetTypeByInvokingAnException(obj);
}
return typeName;
}

@SuppressWarnings('PMD.UnusedLocalVariable')
Expand Down