/** * {@inheritdoc} */ public function toArray() { $this->validateConstraint(); return ['constraint' => $this->constraint] + parent::toArray(); }