Code Duplication    Length = 11-11 lines in 2 locations

src/Repositories/TicketRepository.php 1 location

@@ 109-119 (lines=11) @@
106
     * @param string  $prefix
107
     * @return string|false
108
     */
109
    protected function getAvailableTicket($totalLength, $prefix)
110
    {
111
        return $this->ticketGenerator->generate(
112
            $totalLength,
113
            $prefix,
114
            function ($ticket) {
115
                return is_null($this->getByTicket($ticket, false));
116
            },
117
            10
118
        );
119
    }
120
}
121

src/Repositories/PGTicketRepository.php 1 location

@@ 110-120 (lines=11) @@
107
     * @param string $totalLength
108
     * @return string|false
109
     */
110
    protected function getAvailableTicket($totalLength)
111
    {
112
        return $this->ticketGenerator->generate(
113
            $totalLength,
114
            'PGT-',
115
            function ($ticket) {
116
                return is_null($this->getByTicket($ticket, false));
117
            },
118
            10
119
        );
120
    }
121
}
122