Code Duplication    Length = 10-14 lines in 2 locations

src/AppBundle/Repository/SeatRepository.php 1 location

@@ 52-65 (lines=14) @@
49
     * @return Seat[]
50
     * @throws NotFoundException
51
     */
52
    public function getByVenueSector(VenueSector $venueSector): array
53
    {
54
        $seats = $this->findBy([
55
            'venueSector' => $venueSector
56
        ]);
57
58
        if (empty($seats)) {
59
            throw new NotFoundException(
60
                sprintf('No seats found for venue sector: %s', $venueSector)
61
            );
62
        }
63
64
        return $seats;
65
    }
66
67
68
    /**

src/AppBundle/Repository/VenueSectorRepository.php 1 location

@@ 19-28 (lines=10) @@
16
     * @return VenueSector[]
17
     * @throws NotFoundException
18
     */
19
    public function getByVenue(Venue $venue): array
20
    {
21
        $venueSectors = $this->findBy(['venue' => $venue]);
22
23
        if (empty($venueSectors)) {
24
            throw new NotFoundException('No Venue Sector found for VenueId: '.$venue->getId());
25
        }
26
27
        return $venueSectors;
28
    }
29
}
30