public function putIn(Food $content) { if (in_array($content->getType(), $this->forbiddenFood)) { throw new \ForbiddenFoodTypeException($content->getType()); } $this->content = $content; }