Code Duplication    Length = 7-7 lines in 2 locations

src/Formatter.php 1 location

@@ 94-100 (lines=7) @@
91
     * @param   Model|null              $model
92
     * @return  mixed
93
     */
94
    public function getHasOneDbValue(RelationshipMetadata $relMeta, Model $model = null)
95
    {
96
        if (null === $model || true === $relMeta->isInverse) {
97
            return null;
98
        }
99
        return $this->createReference($relMeta, $model);
100
    }
101
102
    /**
103
     * Prepares and formats a has-many relationship model set for proper insertion into the database.

src/Persister.php 1 location

@@ 188-194 (lines=7) @@
185
     * @param   Model|null              $model
186
     * @return  mixed
187
     */
188
    protected function prepareHasOne(RelationshipMetadata $relMeta, Model $model = null)
189
    {
190
        if (null === $model || true === $relMeta->isInverse) {
191
            return null;
192
        }
193
        return $this->createReference($relMeta, $model);
194
    }
195
196
    /**
197
     * Prepares and formats a has-many relationship model set for proper insertion into the database.