Skip to content

Instantly share code, notes, and snippets.

@mathollingsworth
Created October 26, 2015 22:53
Show Gist options
  • Save mathollingsworth/14f17e5c4366855ab5ae to your computer and use it in GitHub Desktop.
Save mathollingsworth/14f17e5c4366855ab5ae to your computer and use it in GitHub Desktop.
A common approach
public function getTheNameOfTheBestBreakingBadCharacter() {
$allTheCharacters = $dataLayer->getAllCharacters();
$currentCharacter = null;
foreach ($allTheCharacters as $theCharacter) {
if($currentCharacter == null || $theCharacter>isBetter($currentCharacter)){
$currentCharacter = $theCharacter
}
}
return $currentCharacter
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment