src/Formatter.php
private function createReference(RelationshipMetadata $relMeta, Model $model)
    {
        $reference = [];
        $identifier = $this->getIdentifierDbValue($model->getId());
        if (true === $relMeta->isPolymorphic()) {
            $reference[Persister::IDENTIFIER_KEY]  = $identifier;
            $reference[Persister::POLYMORPHIC_KEY] = $model->getType();
            return $reference;
        }
        return $identifier;
    }
private function createReference(RelationshipMetadata $relMeta, Model $model)
    {
        $reference = [];
        $identifier = $this->getIdentifierDbValue($model->getId());
        if (true === $relMeta->isPolymorphic()) {
            $reference[Persister::IDENTIFIER_KEY]  = $identifier;
            $reference[Persister::POLYMORPHIC_KEY] = $model->getType();
            return $reference;
        }
        return $identifier;
    }
private function createReference ( RelationshipMetadata $ relMeta , Model $ model ) { $ reference = [ ] ; $ identifier = $ this -> getIdentifierDbValue ( $ model -> getId ( ) ) ; if ( true === $ relMeta -> isPolymorphic ( ) ) { $ reference [ Persister :: IDENTIFIER_KEY ] = $ identifier ; $ reference [ Persister :: POLYMORPHIC_KEY ] = $ model -> getType ( ) ; return $ reference ; } return $ identifier ; }
Creates a reference for storage of a related model in the database

@param   RelationshipMetadata    $relMeta
@param   Model                   $model
@return  mixed
Creates a reference for storage of a related model in the database