Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Keep thy code stupid simple (KISS) - bad example
public boolean isTrue(boolean myBool){
if(myBool){
return true;
}else{
return false;
}
}
public Map<Id,Contact> getContactMap(){
Map<Id,Contact> contactMap = new Map<Id,Contact>();
List<Contact> contacts = [Select Id From Contact];
if(contacts != null && contacts.size() > 0 && !contacts.isEmpty()){
for(Integer i=0; i < contacts.size(); i++){
contactMap.put(contacts.get(i).Id,contacts.get(i));
}
}
return contactMap;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.