GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 14-14 lines in 2 locations

src/AppBundle/Entity/WorkdayRepository.php 2 locations

@@ 152-165 (lines=14) @@
149
        return $calendar;
150
    }
151
152
    public function getNext(Workday $workday)
153
    {
154
        $query = $this->createQueryBuilder('w')
155
            ->where('w.agreement = :agreement')
156
            ->andWhere('w.date > :date')
157
            ->orderBy('w.date', 'ASC')
158
            ->setParameter('date', $workday->getDate())
159
            ->setParameter('agreement', $workday->getAgreement())
160
            ->getQuery();
161
162
        $result = $query->setMaxResults(1)->getResult();
163
164
        return $result ? $result[0] : null;
165
    }
166
167
    public function getPrevious(Workday $workday)
168
    {
@@ 167-180 (lines=14) @@
164
        return $result ? $result[0] : null;
165
    }
166
167
    public function getPrevious(Workday $workday)
168
    {
169
        $query = $this->createQueryBuilder('w')
170
            ->where('w.agreement = :agreement')
171
            ->andWhere('w.date < :date')
172
            ->orderBy('w.date', 'DESC')
173
            ->setParameter('date', $workday->getDate())
174
            ->setParameter('agreement', $workday->getAgreement())
175
            ->getQuery();
176
177
        $result = $query->setMaxResults(1)->getResult();
178
179
        return $result ? $result[0] : null;
180
    }
181
182
    public function getWorkdaysInRange(Agreement $agreement, \DateTime $start, \DateTime $end)
183
    {