Code Duplication    Length = 12-12 lines in 2 locations

Bundle/BlogBundle/Repository/ArticleRepository.php 2 locations

@@ 84-95 (lines=12) @@
81
        return $this;
82
    }
83
84
    public function getPreviousRecord($id)
85
    {
86
        $queryBuilder = $this->getAll(true)
87
            ->getInstance();
88
89
        return $queryBuilder->andWhere($queryBuilder->expr()->lt('article.id', ':id'))
90
            ->setParameter('id', $id)
91
            ->orderBy('article.id', 'DESC')
92
            ->setMaxResults(1)
93
            ->getQuery()
94
            ->getOneOrNullResult();
95
    }
96
97
    public function getNextRecord($id)
98
    {
@@ 97-108 (lines=12) @@
94
            ->getOneOrNullResult();
95
    }
96
97
    public function getNextRecord($id)
98
    {
99
        $queryBuilder = $this->getAll(true)
100
            ->getInstance();
101
102
        return $queryBuilder->andWhere($queryBuilder->expr()->gt('article.id', ':id'))
103
            ->setParameter('id', $id)
104
            ->orderBy('article.id', 'ASC')
105
            ->setMaxResults(1)
106
            ->getQuery()
107
            ->getOneOrNullResult();
108
    }
109
110
    public function getVeryFirstRecord()
111
    {