Code Duplication    Length = 5-5 lines in 2 locations

src/Formatter.php 1 location

@@ 200-204 (lines=5) @@
197
    private function createReference(RelationshipMetadata $relMeta, Model $model)
198
    {
199
        $identifier = $this->getIdentifierDbValue($model->getId());
200
        if (true === $relMeta->isPolymorphic()) {
201
            $reference[$this->getIdentifierKey()] = $identifier;
202
            $reference[$this->getPolymorphicKey()] = $model->getType();
203
            return $reference;
204
        }
205
        return $identifier;
206
    }
207

src/Persister.php 1 location

@@ 226-230 (lines=5) @@
223
     */
224
    protected function createReference(RelationshipMetadata $relMeta, Model $model)
225
    {
226
        if (true === $relMeta->isPolymorphic()) {
227
            $reference[$this->getIdentifierKey()] = $this->convertId($model->getId());
228
            $reference[$this->getPolymorphicKey()] = $model->getType();
229
            return $reference;
230
        }
231
        return $this->convertId($model->getId());
232
    }
233