/** * {@inheritDoc} */ public function setType($type) { if (!AttributeTypes::exists($type)) { throw new \InvalidArgumentException(); } $this->type = $type; return $this; }