Code Duplication    Length = 11-11 lines in 3 locations

src/Badger/Bundle/GameBundle/Factory/AdventureStepCompletionFactory.php 1 location

@@ 18-28 (lines=11) @@
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function create(UserInterface $user, AdventureStepInterface $step)
19
    {
20
        $stepCompletion = new AdventureStepCompletion();
21
22
        $stepCompletion->setUser($user);
23
        $stepCompletion->setAdventureStep($step);
24
        $stepCompletion->setCompletionDate(new \DateTime());
25
        $stepCompletion->setPending(true);
26
27
        return $stepCompletion;
28
    }
29
}
30

src/Badger/Bundle/GameBundle/Factory/BadgeCompletionFactory.php 1 location

@@ 21-31 (lines=11) @@
18
     *
19
     * @return BadgeCompletion
20
     */
21
    public function create(UserInterface $user, BadgeInterface $badge)
22
    {
23
        $badgeCompletion = new BadgeCompletion();
24
25
        $badgeCompletion->setUser($user);
26
        $badgeCompletion->setBadge($badge);
27
        $badgeCompletion->setCompletionDate(new \DateTime());
28
        $badgeCompletion->setPending(true);
29
30
        return $badgeCompletion;
31
    }
32
}
33

src/Badger/Bundle/GameBundle/Factory/QuestCompletionFactory.php 1 location

@@ 18-28 (lines=11) @@
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function create(UserInterface $user, QuestInterface $quest)
19
    {
20
        $questCompletion = new QuestCompletion();
21
22
        $questCompletion->setUser($user);
23
        $questCompletion->setQuest($quest);
24
        $questCompletion->setCompletionDate(new \DateTime());
25
        $questCompletion->setPending(true);
26
27
        return $questCompletion;
28
    }
29
}
30