Skip to content

Instantly share code, notes, and snippets.

@tupton
Created July 19, 2012 17:21
Show Gist options
  • Save tupton/3145451 to your computer and use it in GitHub Desktop.
Save tupton/3145451 to your computer and use it in GitHub Desktop.
FIXME and TODO
<?php
function getObject($id) {
$object = null;
// TODO Do we need to validate username?
$objects = $this->db->retrieveForUsername($this->username);
// FIXME Write `retrieveForIdAndUsername` instead of iterating here
foreach ($objects as $o) {
if ($o->id() == $id) {
$object = $o;
break;
}
}
return $object;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment