/** * @return array<string,mixed> */ public function toArray() : array { return ["name" => $this->field->getName(), "type" => $this->getType(), "signature" => $this->getSignature(), "description" => $this->field->getDescription(), "default" => $this->field->getDefaultValue(), "rules" => array_filter(["keys" => $this->getKeyRules(), "values" => array_merge($this->getValueRules(), $this->getFieldRules())])]; }