src/Hydrator.php
private function extractIdAndType(EntityMetadata $metadata, array &$data)
    {
        $identifier = $this->extractField(Persister::IDENTIFIER_KEY, $data);
        unset($data[Persister::IDENTIFIER_KEY]);

        $key = Persister::POLYMORPHIC_KEY;
        $type = $this->extractType($metadata, $data);
        if (isset($data[$key])) {
            unset($data[$key]);
        }
        return [$identifier, $type];
    }
private function extractIdAndType(EntityMetadata $metadata, array &$data)
    {
        $identifier = $this->extractField(Persister::IDENTIFIER_KEY, $data);
        unset($data[Persister::IDENTIFIER_KEY]);

        $key = Persister::POLYMORPHIC_KEY;
        $type = $this->extractType($metadata, $data);
        if (isset($data[$key])) {
            unset($data[$key]);
        }
        return [$identifier, $type];
    }
private function extractIdAndType ( EntityMetadata $ metadata , array & $ data ) { $ identifier = $ this -> extractField ( Persister :: IDENTIFIER_KEY , $ data ) ; unset ( $ data [ Persister :: IDENTIFIER_KEY ] ) ; $ key = Persister :: POLYMORPHIC_KEY ; $ type = $ this -> extractType ( $ metadata , $ data ) ; if ( isset ( $ data [ $ key ] ) ) { unset ( $ data [ $ key ] ) ; } return [ $ identifier , $ type ] ; }
Extracts the identifier and model type from a raw result and removes them from the source data.
Returns as a tuple.

@param   EntityMetadata  $metadata
@param   array           &$data
@return  array
@throws  PersisterException
Extracts the identifier and model type from a raw result and removes them from the source data . Returns as a tuple .