src/Bridge/Elasticsearch/Serializer/ItemNormalizer.php
private function populateIdentifier(array $data, string $class): array
    {
        $identifier = $this->identifierExtractor->getIdentifierFromResourceClass($class);
        $identifier = null === $this->nameConverter ? $identifier : $this->nameConverter->normalize($identifier, $class, self::FORMAT);

        if (!isset($data['_source'][$identifier])) {
            $data['_source'][$identifier] = $data['_id'];
        }

        return $data;
    }
private function populateIdentifier(array $data, string $class): array
    {
        $identifier = $this->identifierExtractor->getIdentifierFromResourceClass($class);
        $identifier = null === $this->nameConverter ? $identifier : $this->nameConverter->normalize($identifier, $class, self::FORMAT);

        if (!isset($data['_source'][$identifier])) {
            $data['_source'][$identifier] = $data['_id'];
        }

        return $data;
    }
private function populateIdentifier ( array $ data , string $ class ) : array { $ identifier = $ this -> identifierExtractor -> getIdentifierFromResourceClass ( $ class ) ; $ identifier = null === $ this -> nameConverter ? $ identifier : $ this -> nameConverter -> normalize ( $ identifier , $ class , self :: FORMAT ) ; if ( ! isset ( $ data [ '_source' ] [ $ identifier ] ) ) { $ data [ '_source' ] [ $ identifier ] = $ data [ '_id' ] ; } return $ data ; }
Populates the resource identifier with the document identifier if not present in the original JSON document.
Populates the resource identifier with the document identifier if not present in the original JSON document .