public function setResidue($residue) { if (!$residue instanceof Block) { throw new \InvalidArgumentException("Eating a Block can only result in a Block residue"); } parent::setResidue($residue); }
public function setResidue($residue) { if (!$residue instanceof Item) { throw new \InvalidArgumentException("Eating an Item can only result in an Item residue"); } parent::setResidue($residue); }