Code Duplication    Length = 7-7 lines in 2 locations

src/PlaygroundGame/Service/PostVote.php 2 locations

@@ 35-41 (lines=7) @@
32
33
        $post = $postvotePostMapper->findOneBy(array('entry' => $entry));
34
35
        if (! $post) {
36
            $post = new \PlaygroundGame\Entity\PostVotePost();
37
            $post->setPostvote($game);
38
            $post->setUser($user);
39
            $post->setEntry($entry);
40
            $post = $postvotePostMapper->insert($post);
41
        }
42
43
        $path = $this->getOptions()->getMediaPath() . DIRECTORY_SEPARATOR . 'game' . $game->getId() . DIRECTORY_SEPARATOR;
44
        if (!is_dir($path)) {
@@ 118-124 (lines=7) @@
115
116
        $post = $postvotePostMapper->findOneBy(array('entry' => $entry));
117
118
        if (! $post) {
119
            $post = new \PlaygroundGame\Entity\PostVotePost();
120
            $post->setPostvote($game);
121
            $post->setUser($user);
122
            $post->setEntry($entry);
123
            $post = $postvotePostMapper->insert($post);
124
        }
125
126
        $path = $this->getOptions()->getMediaPath() . DIRECTORY_SEPARATOR . 'game' . $game->getId() . DIRECTORY_SEPARATOR;
127
        if (!is_dir($path)) {