its a gaming site, and we store scores:
class Game
{
public function addScore($player, $score)
{
INSERT INTO game .........
}
}
administrators may erase scores so lets add a removal method too:
public function delete($id)
{
DELETE FROM game .........
}
now the problem is, deletion is logged, so we must wrap this code:
Controller:
$log->addLog('user deletetion');
$game->delete($id);
So when we delete this game in controller, the logging takes place too. Now here comes the problem: in code, nothing prevents to just call the $game->delete(); method! This is bad, because if any rookie start using this code, he cant know that deletion must come with logging. Is this a sign of something, or??