Keep thy code stupid simple (KISS) - bad example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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