private function serializePersonalDataValue(SerializablePersonalDataValue $value): array {
        $dataKey    = PersonalDataKey::generate();
        $dataString = json_encode($value->serialize());

        $this->dataStore->storeData($value->personalKey(), $dataKey, PersonalData::fromString($dataString));

        return [
            'personalKey' => $value->personalKey()->serialize(),
            'dataKey'     => $dataKey->serialize(),
        ];
    }
private function serializePersonalDataValue(SerializablePersonalDataValue $value): array {
        $dataKey    = PersonalDataKey::generate();
        $dataString = json_encode($value->serialize());

        $this->dataStore->storeData($value->personalKey(), $dataKey, PersonalData::fromString($dataString));

        return [
            'personalKey' => $value->personalKey()->serialize(),
            'dataKey'     => $dataKey->serialize(),
        ];
    }
private function serializePersonalDataValue ( SerializablePersonalDataValue $ value ) : array { $ dataKey = PersonalDataKey :: generate ( ) ; $ dataString = json_encode ( $ value -> serialize ( ) ) ; $ this -> dataStore -> storeData ( $ value -> personalKey ( ) , $ dataKey , PersonalData :: fromString ( $ dataString ) ) ; return [ 'personalKey' => $ value -> personalKey ( ) -> serialize ( ) , 'dataKey' => $ dataKey -> serialize ( ) , ] ; }
serialize a value that contains personal data

@param SerializablePersonalDataValue $value
@return array
serialize a value that contains personal data