areAllValuesStrings()); if ( !$keysAreStrings ) { throw new \InvalidArgumentException('Key schema for Record must be a string schema or an enum with string values.'); } parent::__construct($itemSchema, $keySchema, $label); $this->keySchema = $keySchema; } public function getSimplifiedDataType() { return 'map'; //Helps ensure that empty records are serialized as {} instead of []. } protected function getJsonSerializeType(): string { return 'record'; } }