Code Duplication    Length = 15-15 lines in 2 locations

src/TreeHouse/IoBundle/Import/Feed/Type/DefaultFeedType.php 1 location

@@ 220-234 (lines=15) @@
217
     *
218
     * @return int The updated index
219
     */
220
    protected function addAssociationModifiers(
221
        FeedBuilderInterface $builder,
222
        $association,
223
        array $mapping,
224
        $startIndex,
225
        $endIndex
226
    ) {
227
        $transformer = new EntityToIdTransformer($this->getEntityManager());
228
229
        if ($mapping['type'] & ClassMetadataInfo::TO_MANY) {
230
            $transformer = new TraversingTransformer($transformer);
231
        }
232
233
        $this->addTransformerBetween($builder, $transformer, $association, $startIndex, $endIndex);
234
    }
235
236
    /**
237
     * @param FeedBuilderInterface $builder

src/TreeHouse/IoBundle/Scrape/Parser/Type/AbstractParserType.php 1 location

@@ 278-292 (lines=15) @@
275
     *
276
     * @return int The updated index
277
     */
278
    protected function addAssociationModifiers(
279
        ParserBuilderInterface $parser,
280
        $association,
281
        array $mapping,
282
        $startIndex,
283
        $endIndex
284
    ) {
285
        $transformer = new EntityToIdTransformer($this->getEntityManager());
286
287
        if ($mapping['type'] & ClassMetadataInfo::TO_MANY) {
288
            $transformer = new TraversingTransformer($transformer);
289
        }
290
291
        $parser->addTransformerBetween($transformer, $association, $startIndex, $endIndex);
292
    }
293
294
    /**
295
     * @param ParserBuilderInterface $parser