public function canBeConsumedBy(Entity $entity) { return $entity instanceof Human and $entity->getFood() < $entity->getMaxFood(); }
public function canBeConsumedBy(Entity $entity) : bool { return $entity instanceof Player and $entity->getFood() < $entity->getMaxFood() and $this->canBeConsumed(); }