The scenario is quite simple to explain with an example:
public function setValue($value)
{
if ($value == 0) {
// DELETE ME
}
return $this;
}
I'm probably going to use a workaround (i.e.: deleting the object after the call to setValue
, but I'd like to encapsulate this business logic within the method)